Support » Fixing WordPress » Using Get Recent Comments widget twice

Viewing 15 replies - 1 through 15 (of 15 total)
  • Maiskolben

    (@maiskolben)

    I think this ain’t twice recent comment widges… The first with the photographs are pickedup manually or by an other plugin, imo..

    Jonas Grumby

    (@ss_minnow)

    Recent Comments is not there twice.

    Thread Starter haussamen

    (@haussamen)

    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.

    Jonas Grumby

    (@ss_minnow)

    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.

    Thread Starter haussamen

    (@haussamen)

    So there’s no way to manipulate it?

    Maiskolben

    (@maiskolben)

    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…

    Jonas Grumby

    (@ss_minnow)

    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.

    Thread Starter haussamen

    (@haussamen)

    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().”

    Maiskolben

    (@maiskolben)

    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…

    Jonas Grumby

    (@ss_minnow)

    It can also be above the dynamic area.

    Jonas Grumby

    (@ss_minnow)

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

    Maiskolben

    (@maiskolben)

    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 } ?>
    Maiskolben

    (@maiskolben)

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

    Thread Starter haussamen

    (@haussamen)

    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!

    Jonas Grumby

    (@ss_minnow)

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

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