WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Using Get Recent Comments widget twice

[Resolved] Using Get Recent Comments widget twice

Viewing 15 replies - 1 through 15 (of 15 total)
  • I think this ain’t twice recent comment widges… The first with the photographs are pickedup manually or by an other plugin, imo..

    Recent Comments is not there twice.

    I’m talking about the section at the bottom of the left column titled “Recent comments.” I’d like to be able to use that widget twice, but when I put it into the left column, it’s not also left behind in the widgets area for me to put in a second time somewhere else on the site.

    If the widget is not designed to be used multiple times it can’t be. This is becoming a greater issue with themes that allow you to show different sidebars on different pages.

    So there’s no way to manipulate it?

    Even post it to another question, maybe you can handle it with (post this anywhere out of your sidebar):

    <?php if (function_exists('get_recent_comments')) { ?>
    <h2><?php _e('Recent Comments:'); ?></h2>
    <p><?php get_recent_comments(); ?></p>
    <?php } ?>

    It’s a bit tricky, but not impossible I think…

    Yes you can hard-code it in if you know how. If you are using widgets, your code has to be outside the dynamic area of the sidebar.

    Maiskolben, what code would I add to that to have it appear only on the home page? I do use Widget Logic, so I assume it somehow includes the code “!is_home().”

    yes, you’re right! And viĆ” cascading stylesheets you can post hardcoded stuff within your sidebar but under the dynamic area, and make it looks like the sidebar as well…

    It can also be above the dynamic area.

    and if you hard-code it, you can use Conditional Tags to make it only appear on certain pages.

    I guess something like that, it’s not tested…

    <?php if (is_home() || function_exists('get_recent_comments')) { ?>
    <h2><?php _e('Recent Comments:'); ?></h2>
    <p><?php get_recent_comments(); ?></p>
    <?php } ?>

    @ss_minnow: Cool! ^^ thanks for that link!

    I even have the php code widget, so I plugged that code into a widget instead of into the page code and it worked great.

    Thanks for the help!

    Good idea to use the php code widget. Glad it worked.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] Using Get Recent Comments widget twice’ is closed to new replies.
Skip to toolbar