WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Works great! Except when I try this... (3 posts)

  1. Runtheball
    Member
    Posted 1 year ago #

    I've been using Widget Logic for awhile now with no problems. But I'm having an issue today getting it to display a widget on a specific page. When I use Widget Logic to place widgets on "is_page('contact')" or "is_page('about')" - no problems! But when I tried to put the same widget on "is_page('pool-covers')" it doesn't work - I see nothing at all. The full path is "mydomain.com/swimming-pool-services/pool-covers/". How do I need to write WidgetLogic to display a widget on that page? I've tried many variations and none work.

    I've tried checking the "wp_reset_query" checkbox: it had no effect.

    I don't think the codex info on 'testing for sub pages' is going to work, since there are several subpages under 'swimming-pool-services', and I only want this widget to appear on one of those subpages.

    http://wordpress.org/plugins/widget-logic/

  2. Runtheball
    Member
    Posted 1 year ago #

    After digging further through the forums, I've come up with the following ...

    global $post; return (is_page('pool-covers') && ($post->post_parent=="7"));

    ...but it still doesn't work.

    I'm trying to display a widget on one particular page that's a child of a page with id of 7.

  3. Runtheball
    Member
    Posted 12 months ago #

    I'm sure this is a simple fix.

    Could someone please evaluate my most recent post and tell me where my code is in error?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags