WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
is_home(), is_front_page() not working (9 posts)

  1. thepark
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to show some widgets on homepage footer only,

    Tried:
    is_home(), is_front_page(), is_page('page name/number')
    also more complex conditions (not (tags,cat,single)

    But its filtering the homepage as well

    Any idea?

    Thanks
    Guy

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

  2. thepark
    Member
    Posted 1 year ago #

    forgot, the site is: http://www.showchef.co.il

  3. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    a lot of themes do custom code for the front page that can negate WP's is_front_page() condition. I expect if you switched themes the problem would go away. Is the front page theme code available to look at?

  4. thepark
    Member
    Posted 1 year ago #

  5. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    hmm, yes it does many query_posts but the sidebars are all after those. there's some chance the wp_reset_query option might help. give that a go

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

  6. thepark
    Member
    Posted 1 year ago #

    thanks,
    tried it, also tried the - load after theme option, still filter the front page as well (on condition is_home() || is_front_page() )

  7. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    if it's just the footer that's troubling you, here's a hack-y suggestion… line 8 of footer.php

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Footer") )

    before the "if" add in wp_reset_query();

  8. thepark
    Member
    Posted 1 year ago #

    Will try it, thanks

  9. thehalvo
    Member
    Posted 8 months ago #

    Yeah the wp_reset_query(); worked for me. Cheers @alanft!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.