WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Evolved
[resolved] SyntaxHighlighter Evolved and shortcodes (6 posts)

  1. aldolat
    Member
    Posted 4 years ago #

    Hi Viper007Bond,
    thanks for this plugin! :)

    On my theme I have some shortcodes active and, if I want to show the sourcecode on a post, WordPress partially executes them.

    For example, a line like this:

    [php][youtube id=http://www.youtube.com/watch?v=kC9Ju63Bchk width=460 height=372][/php]

    will be at a first moment executed (I see the resulting video) and then the video is replaced by the code that would be generated by the shortcode, i.e.

    <p><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/kC9Ju63Bchk&hl=it_IT&start=0" height="372" width="460">
    <param name="movie" value="http://www.youtube.com/v/kC9Ju63Bchk&hl=it_IT&start=0">
    <param name="FlashVars" value="playerMode=embedded">
    <param name="wmode" value="transparent">
    </object></p>

    So, the question is: can I post a shortcode -- active on my theme -- using your plugin? For "shortcode" I mean a line like this:
    [youtube id=http://www.youtube.com/watch?v=kC9Ju63Bchk width=460 height=372]

    Bye!

    http://wordpress.org/extend/plugins/syntaxhighlighter/

  2. Try "breaking" the shortcode with some wasted HTML tags.

    For example:

    [you<em></em>tube id=http://www.youtube.com/watch?v=kC9Ju63Bchk width=460 height=372]

    Should display as:

    [youtube id=http://www.youtube.com/watch?v=kC9Ju63Bchk width=460 height=372]

  3. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 4 years ago #

    This also may work:

    [[youtube id=http://www.youtube.com/watch?v=kC9Ju63Bchk width=460 height=372]]

    It's a built-in WordPress feature that should work.

  4. When did they add that? It makes so much more sense. :)

    Thank you!

  5. Alex Mills (Viper007Bond)
    Moderator
    Plugin Author

    Posted 4 years ago #

    Quite a while back. :)

    I believe it only works on single tags though, or something.

  6. aldolat
    Member
    Posted 4 years ago #

    Solved! Thanks to you both! :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic