WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Simple Page Sidebars] Widget/Sidebar not attaching to correct page

[Resolved] [Plugin: Simple Page Sidebars] Widget/Sidebar not attaching to correct page

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Brady Vercher
    Participant

    @bradyvercher

    The blog page can be tricky, but essentially what’s usually happening is that the loop of posts replaces the global $post variable, so by the time the sidebar is displayed, the plugin no longer knows what the original page was and thinks it’s the last post rather than the blog page (or any page with a list of posts).

    If this is a theme you’re building, you’ll need to be sure to follow the loop with wp_reset_query().

    Otherwise, if you’ve assigned the blog page as the page for posts in Settings->Reading, it should detect that automatically and use the custom sidebar if you’ve assigned one.

    Thanks for being so quick on support. That worked for me.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Simple Page Sidebars] Widget/Sidebar not attaching to correct page’ is closed to new replies.