Support » Plugin: PHP Code for posts » Snippet being rendered outside column shortcode

  • Resolved zimbo000


    Here is the code I use on home page:

    <h5 class="homepage">Other Recent News</h5>
    [blog_list thumb="small" showposts="3" category_in= "46" disable="content,meta,more"]
    [random_posts title="Did you read these stories?" quantity_of_posts="2" Style_sra="3" AutoUpdate="1" Updating_Time="5"]
    <h5 class="homepage">Recent Comments</h5>
    [php snippet=3]

    Here is my snippet:
    <?php if(function_exists('jme_display_comments')) { jme_display_comments( array( 1 => 1, 2 => 40, 9 => 1, 3 => '<h3><a href="%PERMALINK%">%POSTTITLE%</a></h3>"%COMMENT%..."'));} ?>

    It works, but here is the HTML output:

    <div class="one_third last">
    <h5 class="homepage">Other Recent News</h5>
    <ul class="post_list small_post_list">
    <div class="widget spider_random_article">
    <script type="text/javascript">
    <div id="randarticle_0" style="">
    <h5 class="homepage">Recent Comments</h5>
    <ul class="customized-recent-comments">
    <li class="recentcomment">

    The homepage code has [php snippet=3] inside the [one_third] column tags but the HTML is rendered with the snippet appearing outside/after the closing <div> of the column.

    Any idea why – and how can I fix it? If you want to view the page it’s here: – you can see how the snippet should be lined up in the right hand third column but is wrapping across the whole screen.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jamie


    Hi zimbo000

    I’m not sure if this has been solved, or if you have used a different solution, but it appears to be working fine now.

    There is no reason that the snippet HTML should be rendered in the incorrect place, as the output from the snippet is returned to the shortcode location.

    It is not solved. Please visit this page I referenced above ( where if you use Firebug to view the HTML you will see the snippet is rendered outside of the [one_third} shortcodes.

    Plugin Author Jamie


    Hi Zimbo,

    I looked into the your html some more, and it would appear a random </div> tag has been placed in your code, which is causing the container to close early, forcing it to break out.

    There certainly is no reason for the plugin to modify the html in the manner that it is happening.



    Many thanks for your time & assistance – I found the problem. I had modified another plugin and used the wrong closing tag. Now fixed. Sent you something for your trouble.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Snippet being rendered outside column shortcode’ is closed to new replies.