Support » Plugin: Global Content Blocks » Code Snippet Displays as Text

  • Resolved WPwalt11

    (@wpwalt11)


    I’ve created a content block containing this code snippet:
    <a href="javascript:toggleVisibility('vistest')">Toggle Visibility<\a>
    I inserted the block in a page, but when the page displays, instead of displaying the link defined by the snippet, it displays exactly as shown above, as though it were text and not code. (I used the visual mode of the editor when creating the block. I’ve also tried the text mode and source code, but then the editor modifies the input.)

    What should I be doing to make it work as code? –Thanks.

    https://wordpress.org/plugins/global-content-blocks/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author benz1

    (@benz1)

    Change your <\a> to </a> and add it to the content block in text mode and it should work. I just tried and it works for me.

    Thread Starter WPwalt11

    (@wpwalt11)

    Thanks for that very quick response! Sorry about the \a. Just missed it.
    It does indeed work now, if I save the contact block while I’m still in text mode in the editor. I was having the problem before (even with a correct /a) because I was going back to visual mode and then saving the contact block. If you do that, apparently the editor changes what you had while in text mode.

    I’m attempting now to use variables in the contact block, but the %% is not being recognized. I’ll start a new topic if I can’t get it to work.

    Thanks again.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Code Snippet Displays as Text’ is closed to new replies.