WordPress.org

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] How can I hide the entire YARPP widget if no posts found? (6 posts)

  1. andersonmultimedia
    Member
    Posted 1 year ago #

    I tried editing a YARPP template, but it only hid the message. I need to hide the entire widget, including the heading. There must be a way of using a conditional statement to hide it. I've seen other related posts plugins that include an admin feature to hide theirs. I'm just not sharp enough to unravel their code to apply to my situation.

    http://wordpress.org/plugins/yet-another-related-posts-plugin/

  2. jeffparker
    Member
    Plugin Author

    Posted 1 year ago #

  3. andersonmultimedia
    Member
    Posted 1 year ago #

    Thanks. That did get rid of the heading and the no posts message, but it leaves a little sliver of the background. This is what I grabbed from Firebug on it: `<aside id="yarpp_widget-2" class="dbx-box suf-widget widget_yarpp_widget">
    <div class="dbx-content">
    </aside>`

  4. andersonmultimedia
    Member
    Posted 1 year ago #

    I got it. Just needed to target background with widget_yarpp_widget instead of yarpp_widget-2.suf-widget (I'm using Suffusion child theme). Thanks for steering me to the appropriate thread!

  5. jeffparker
    Member
    Plugin Author

    Posted 1 year ago #

    Great! Glad it worked out for you.

    If you haven't already, I'd love to hear how you heard about YARPP: http://www.surveymonkey.com/s/Z278L88

    Thanks.

  6. Fabian
    Member
    Posted 1 year ago #

    Thanks! I modify my current template (template-thumbnails.php) by moving

    if (have_posts()) {

    up and removing

    else {
    	$output .= $no_results;
    }

    It works.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic