Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Contributor Qurl

    (@qurl)

    Because you selected the front-page to be a static page. The DW options can be found under the static page module.

    Thread Starter stianjaco

    (@stianjaco)

    Yes I tried that. Selecting “NO” to everything except the page that is my front page.. still, did’t work

    Plugin Contributor Qurl

    (@qurl)

    Try the OLD method.

    Go to the DW overview page, at the bootom click ‘Advanced’. Tick the checkbox for OLD method.

    Thread Starter stianjaco

    (@stianjaco)

    Ok, so I’ve activated the “Old Method”. Set my widget to “NO on all”.
    When down to pages and selected only the page “Hovedside (Front page)”.
    Nothing..
    I also tried to navigate to that page, /?page_id=44
    Nothing..
    Any ideas on what I’m doing wrong? I’m using the latest version of wordpress if that is an issue..
    EDIT:
    – Tried to activate/deactivate permalinks. no results
    – Tried to enable / disable at page for post. no results

    Thread Starter stianjaco

    (@stianjaco)

    There got to be something wrong with the “pages” filter.. Dont know what, if you get login could you take a look?

    Plugin Contributor Qurl

    (@qurl)

    What is it exactly what you’re trying? Looking at your messages it seems you’re trying to show up a widget. I guess when you’re saying it’s not working the widget doesn’t show up. Does it show up when you set the widget to static (aka no DW rules)? Is the front page the only page where it goes wrong? Or are there other pages going wrong as well?

    Thread Starter stianjaco

    (@stianjaco)

    The scenario:
    I have a slideshow-plugin that should only be visible on the frontpage (without editing template files)
    The frontpage is a static wordpress page.

    When no rules set (aka no DW rules) the widgets is visible on all pages, posts and categories.
    When I select only the frontpage under “pages” (Checked the “Set all options to NO” first)
    it don’t show up anywhere.
    When I select every page under “pages” except the frontpage and set the “Show widget default on static pages?” to YES it show up on every page.. (Including the frontpage)

    Plugin Contributor Qurl

    (@qurl)

    Ok, apparently the ID of the page (44) is not received by DW. Probably another ID or no ID at all. Are there custom queries running on that page? If so, try to add a wp_reset_query() just before the sidebar is called.

    Thread Starter stianjaco

    (@stianjaco)

    Did’t not help, here is my code now:

    wp_reset_query();
    echo get_the_ID(); // Just to check if we have the ID (this case 44)
    if( is_active_sidebar( 'before-content') ) {
       echo "<div id=\"before-content\">\n";
       dynamic_sidebar( 'before-content' );
       echo "</div>";
    }

    The ID shows, but if the widget is dynamic and I have only one widget in the “before-content”. The is_active_sidebar returns false. The filter is set up to show only on the page with the ID 44

    Plugin Contributor Qurl

    (@qurl)

    Great, you know PHP.
    Can you check the following?

    Where DW thinks you are: $DW->whereami
    See if postID is available: $post->ID

    WhereAmI should return ‘page’ or ‘home’. And the PostID should return 44.
    When WhereAmI reports ‘home’. What is the get_option('page_for_posts') ?

    Thread Starter stianjaco

    (@stianjaco)

    OK, $post->ID returns 44, $DW->whereami returns nothing, and the entire $DW object return NULL.
    get_option(‘page_for_posts’) returns “0”

    Plugin Contributor Qurl

    (@qurl)

    Can you try a global $DW; and the try again to read the $DW->whereami ?

    Thread Starter stianjaco

    (@stianjaco)

    Already did, when I saw that the $DW returned NULL. 🙂
    Now I get:
    get_the_ID(): 32
    $DW->whereami: page
    page_for_posts: 0
    $post->ID: 32

    But not the widget..

    Plugin Contributor Qurl

    (@qurl)

    Just to be sure: You also moved the widget rule to ID 32?

    When that’s the case I really don’t see why DW would refuse to display the widget. All information is there what DW uses to determine which rule to follow. Then I’d like to put DW into debugging mode and hopefully that shows where it goes wrong.

    Thread Starter stianjaco

    (@stianjaco)

    Yes, Widgetrule is set on page 32 🙂
    Thought I would try it on another page just to be shure.

    When I use the “old method”, is_active_sidebar( ‘before-content’) returns true,
    but dynamic_sidebar( ‘before-content’ ) returns nothing.

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘Frontpage rule not working’ is closed to new replies.