WordPress.org

Ready to get started?Download WordPress

Forums

widget-logic just not working (7 posts)

  1. reptilegrrl
    Member
    Posted 5 years ago #

    I've got widget-logic installed and I've tried using it but it's just not working. I started with the "recent posts" widget, using the conditional tag "is_front_page()". Yes, I saved changes- but the widget still displays on every page of the site. Am I doing something wrong?

  2. alanft
    Member
    Posted 5 years ago #

    it does look like it yes. is_front_page() is perfectly good - and works ok on my sample 2.6 install.

    can you make the widget vanish from all pages by putting in just 'false'?

  3. reptilegrrl
    Member
    Posted 5 years ago #

    Nope, it doesn't vanish. Could it be an issue with my theme? it is widgetized, but the author added widgets some time after the theme was created and really didn't make any provision for them.

  4. alanft
    Member
    Posted 5 years ago #

    it could be - what happens if you switch to another theme? - say the 'WP default' theme eg?

    if it turns out to be that, is it a public theme that i can look at the code?

  5. thornbyte
    Member
    Posted 5 years ago #

    Hi,

    This is a great plugin.

    It works on my pages but I can't get it working on my BLOG page.

    Maybe I just missed something,

    is_page('blog')

    I just want all my widgets except 'pages' to appear on the 'blog' page,

    Any help is very much appreciated.

  6. alanft
    Member
    Posted 5 years ago #

    if you have a page called blog (or with the URL/slug 'blog') in the list of pages under Manage > Pages, then this should work.

    it could be that the page is based on a template - what is the code in the template? it could be manipulating WP information so that is_page fails.

    it helps when troubleshooting to try switching to the WP default theme and see if the problem persists.

  7. The Gal
    Member
    Posted 5 years ago #

    thornbyte, I had the same problem you did. Here's what I did; I went to "manage pages" and put my mouse over the "published" link on the page I wanted my widget on. On the bottom of the screen, I looked at the address of my page. There I found my page ID. It said "page_id=8" at the end of the address. So, instead of using the tag "is_page('Children's Page')", I used "is_page('8')". Voila! It worked.

    Hope this helps!

Topic Closed

This topic has been closed to new replies.

About this Topic