WordPress.org

Ready to get started?Download WordPress

Forums

Feature A Page Widget
Auto-hide when features page is current page (2 posts)

  1. cueman
    Member
    Posted 8 months ago #

    Hi,

    It's sometimes useful to use the same sidebar on many pages, so that you have a group of pages with a sidebar showing excerpts from similar pages. For this to work in the least painful way possible, it's helpful if you could have the same sidebar on all those pages, with multiple feature-a-page widgets showing each of the pages in the group.

    It also means you would have a situation where the feature-a-page widget tries to feature the current page, which I imagine nobody would want to do.

    Can the plugin be changed to auto-hide the feature-a-page widget when the featured page is the current page? You can do this with a simple change to fpw_widget.class.php in the widget(...) method. Just after you get $featured_page_id and find it's not null, you could do this:

    global $post;
    // if we're featuring the current page, we're done
    if( $featured_page_id == $post->ID)
        return;

    Thanks,
    Paul

    http://wordpress.org/plugins/feature-a-page-widget/

  2. mrwweb
    Member
    Plugin Author

    Posted 8 months ago #

    Thanks for the suggestion, Paul. I'll consider adding this—possibly only as a widget option—in v2.0.0.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.