• I have used thsi plug in many times, however, it is behaving unexplainably right now.

    I have a blog that I have set the READING option to be static pages for both the ‘front page’ AND the ‘posts page’.

    I have a number of pages that use a text widget to call the images and navigation I am using, and it works for every single page, including the front page, but no matter what I do, it does not work with the ‘Posts Page’.

    I’ve tried all the conditional tags I could find, inlcuding is_home(), is_page(‘blog’), is_page(’27’), is_front_page() and a few others that I just tried to make up as I went.

    No matter what I do, it’s a no go. Any thoughts on what I can try to get this to work?

    I’ve tried using standard permalinks, modified permalinks and anything else I can think of.

    The only thing I can think of is something about the ‘posts page’ is causing the problem because it is an archive or some sort.

Viewing 9 replies - 1 through 9 (of 9 total)
  • if i read you correctly, you have many different widgets set to appear on different parts of your site, but the widget set to appear on the main posts page (set to be a static page) is not appearing

    the static posts page you nominate to be the posts page provides the url for the posts page, and does return true with is_home() – at least on a blank setup.

    could it be that the static page you are nominating for the posts page has a template – and that template is running some unusual php code? of course it could be your page.php code (etc) that’s unusual and messing up the conditional tags too.

    but is_home() should definitely work. try switching to the default theme and see if the problem goes away.

    Thread Starter stuntmusic

    (@stuntmusic)

    I’ve tried it with a couple of templates and it doesn’t work.

    If I choose one page to be the ‘front’ page and then another page to be the ‘posts’ page, I can get the widget to work for the ‘front’ page using is_home() but nothing I do will get the widget logic to work for the ‘posts’ page

    The design sorks with all the logic and pages and everything with the exception of the ‘posts’ page, so it’s not the design or the page template itself. if it were that, I would expect it to break other pages.

    The permalinks are set to be /%postname%/

    when i get back to the test system i tried it on (mentioned above it worked ok) i will go through it more carefully. if all is still well, i will post up the steps i took in getting it working as expected.

    According to the Codex:
    Conditional_Tags#The_Main_Page
    is_home should work on “posts page” and is_front_page on a static frontpage.
    Maybe the plugin doesn’t know this?

    there is no reason i can think of that the plugin wouldn’t be able to use these conditional tags – and certainly seemed to on my first quick naive test. i will look asap – but it won’t be for a day or so. come back in a bit.

    cheers

    there is no reason i can think of that the plugin wouldn’t be able to use these conditional tags

    Well, the reason would be if it was released before the “select a static frontpage” gizmo was introduced in WP, and the new is_front_page conditional was set up. Before that there was no such conditional tag.

    Thread Starter stuntmusic

    (@stuntmusic)

    I will try these tags again to see if I can get it to work

    Thread Starter stuntmusic

    (@stuntmusic)

    Ok, it is now working.

    Perhaps I missed something or fat fingered something, but its now working as expected.

    Thanks for the help.

    ok great πŸ™‚

    Well, the reason would be if it was released before the “select a static frontpage” gizmo was introduced in WP

    sorry, i should have said ‘knowing the way the plugin works, there is no reason i can think of…’. as the plugin doesn’t need to ‘know’ about new conditional tags – it just exec’s PHP to get a true or a false. thanks tho.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Widget Logic and Static Front Pages’ is closed to new replies.