Support » Plugins and Hacks » [plugin: Widget Context] static home page

  • Hi,
    I have used widget context on many sites I have designed, but I am having trouble with my latest site.

    I am using a static front page using a very simple template…

    <?php
    	/*
    	Template Name: public
    	*/
    	include TEMPLATEPATH . "/index.php";
    ?>

    but I cannot get my widget to show (or hide) only on the front page I have tried checking these options
    Front Page
    Blog Index

    and in target by url using
    <home>
    home
    /

    etc…
    It just doesn’t work in this one case.

    Am I doing something stupid?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same here… please help!

    <home> doesn’t work at all! 🙁

    I edited the plugin php for my purposes in the end. Just make sure you also modify the name and folder name rather then do it to the original code.

    It’s been coded quite nicely and is easy to understand.

    Goog luck

    rebelit, you should simply select “Show on selected” and choose “Front page”, while leaving everything else unchecked and empty (including the target by URL box).

    I’m having this issue as well. Show on selected with Front Page and nothing else isn’t working for me. I also tried applying the patch here, along with several different variations of the target URL format, to no avail: http://wordpress.org/support/topic/plugin-widget-context?replies=25

    The plugin is working as expected on other pages/posts, just not my static front page.

    UPDATE: This problem is being caused by my use of is_front_page() just below the loop. If I remove that, Widget Context will target the front page as expected. I need to use that function though, so I’m looking for a workaround. Any ideas?

    @solutionsphp Are you sure you don’t run a custom query for posts on that page?

    Try placing wp_reset_query() after your loop and before the widget area.

    http://codex.wordpress.org/Function_Reference/wp_reset_query

    Yes, I’m running a custom query, and forgot about wp_reset_query() (was using rewind_posts.) Adding this after my loop totally fixed my problem. Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[plugin: Widget Context] static home page’ is closed to new replies.