• I’m getting what looks like a comment fragment “–>” inserted in my site that’s showing up through different themes. The default two themes that come with WP don’t have it but the last two new themes I’ve installed both show this fragment in IE (it’s still there in Firefox but it’s ignored and not rendered there). If I view source on either IE or Firefox, I can find this comment code fragment in the page:

    <!–END #secondary .aside–>
    </div>–>
    <!–END #content–>

    Any ideas how to remove this bug? Or is this a problem with both of the themes I’ve installed? I get this same comment fragment in another theme in a different area but still shows up right above the beginning of the main content.

    Here’s my test website

Viewing 5 replies - 1 through 5 (of 5 total)
  • Change them to:

    <!-- END #secondary .aside -->
    </div>-->
    <!-- END #content -->

    It’s a bug in the theme(s).

    Thread Starter perpetualjon

    (@perpetualjon)

    The same bug? I’ve crawled over all the code on both themes and can’t seem to find a single unclosed comment. I’ll zip up each theme and post them up here a little later if that might help…

    Thread Starter perpetualjon

    (@perpetualjon)

    Looks like it happens when I try and “comment out” the sidebar. If I do this in the Main Index Template, it works for Firefox but not for IE. Any ideas how I can eliminate hide the sidebar cleanly without just deleting the code from the file?

    Thread Starter perpetualjon

    (@perpetualjon)

    So this is strange. I have this code in the Main Index Template:

    <?php get_sidebar(); ?>

    …and if I just change it to this:

    <!–<?php get_sidebar(); ?>–>

    I successfully removes the sidebar from the browser in Firefox. In IE, it is still there (along with that fragment of the commenting code). In the mean time, I’ve just deleged this line from the template file and that works but I’d rather not delete code unless I absolutely HAVE to. Any ideas why it works this way?

    If you want to stop the sidebar appearing on the home page, you could try using:

    <?php if( !is_home() && !is_front_page() ) get_sidebar();?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Comment fragment being inserted in page?’ is closed to new replies.