WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Plus
automatic renders and diff. code appears? (3 posts)

  1. oggordon
    Member
    Posted 3 years ago #

    Hi, for some reason this plugin renders the code posted automatically. THis is what I post:

    <div id="authorbox">
        <?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>
        <div class="authortext">
           <h4>About <?php the_author_posts_link(); ?></h4>
           <p><?php the_author_description(); ?></p>
        </div>
    </div>

    and this is what appears once I click on publish:

    <div id="_mcePaste"><div id="authorbox"></div>
    <div id="_mcePaste"><?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?></div>
    <div id="_mcePaste"><div></div>
    <div id="_mcePaste"><h4>About <?php the_author_posts_link(); ?></h4></div>
    <div id="_mcePaste"><p><?php the_author_description(); ?></p></div>
    <div id="_mcePaste"></div></div>
    <div id="_mcePaste"></div></div>
    <div id="authorbox">    <?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '80' ); }?>    <div>       <h4>About <?php the_author_posts_link(); ?></h4>       <p><?php the_author_description(); ?></p>    </div></div>
  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    The mcePaste stuff tells me that you're pasting your code into the visual editor. Paste it into the HTML editor instead.

    Or use the SyntaxHighlighter Evolved plugin, which is probably a bit more up-to-date:
    http://wordpress.org/extend/plugins/syntaxhighlighter/

  3. oggordon
    Member
    Posted 3 years ago #

    I used both but the result was same. However, it workes fine now when pasting the code into the HTML editor. Thanks a bunch Otto!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic