WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Show Top Commentators IE display problem (3 posts)

  1. mpanty
    Member
    Posted 6 years ago #

    Hi. I recently added the Show Top Commentators plug-in to my blog, and are displaying it using the sidebar widget (for that I'm using the Executable PHP widget plug-in and running a PHP script ).

    For some reason, any widgets I insert below the Top Commentators widget end up being broken out of the sidebar, to the left-hand side of the website (into the blog post). The widgets above it are fine. If you're using IE as your browser, you can have a look at my website to see what I'm talking about: http://www.mcalcio.com .

    Reading the posts relating to the Top Commentators plug-in in this forum, it seems this has to do with my CSS stylesheet. I read the resolved post http://wordpress.org/support/topic/122634? and tried applying the solution, but it seems my sheet.css file doesn't contain those lines of codes. I'm using the default Kubrick WordPress theme by the way.

    On a sidenote, the sidebar and the plug-in display perfectly fine in Mozilla Firefox, so the problem seems to be isolated to IE.

    Here's my style.css file. http://wordpress.pastebin.ca/641348

    Any help would be greatly appreciated.

  2. mpanty
    Member
    Posted 6 years ago #

    Ok, after seeing no response I started playing around with the PHP code to be executed inside the Widget. I seem to have found the problem.

    If you're not running a widget sidebar, the install instructions for the plug-in tell you to copy-paste the following code in the sidebar.php file of your theme:

    <?php if(function_exists('ns_show_top_commentators')) { ?>
    <li>
    <h2>Top Commentators</h2>
    <ul><?php ns_show_top_commentators(); ?></ul>
    </li>
    <?php }
    ?>

    Now, I tested the above code as instructed (i.e. in my sidebar.php file, after disabling the sidebar widget), and it worked fine (no display problems). However, running the same code inside the widget with the Executable PHP, breaks the sidebar line (as my original post stated).

    So what's the solution? It seems that removing the list tags ( < li > and < /li > ) in the code fixes the problem. This is the code I'm running now, and it works fine:

    <?php if(function_exists('ns_show_top_commentators')) { ?>
    <h2>Top Commentators</h2>
    <ul><?php ns_show_top_commentators(); ?></ul>
    <?php }
    ?>

    On a sidenote, the theme I have for my website is the default Kubrick theme. Perhaps for other themes this tweak won't work, but it worked for me.

  3. webgrrrl
    Member
    Posted 6 years ago #

    You may want to try the Top Commentators Widget for those using widgets, I modified it from the Show Top Commentators plugin itself.

Topic Closed

This topic has been closed to new replies.

About this Topic