Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kgstwo

    (@kgstwo)

    Any help with this?

    Thread Starter kgstwo

    (@kgstwo)

    I’ve gotten the plugin to a point where the sidebar is showing, but the Custom Sidebars aren’t replacing the proper widgets on their respective pages/posts. On each page the header/footer files don’t get loaded, is there a function that I can call to reinit the custom sidebar once the page is pjax loaded?

    Hi,

    thanks for the feedback 🙂
    Honestly though I have to say that I never heared about PJAX before, a quick google search found this article: http://www.pixelstech.net/article/1366737736-What-is-pjax-and-why-we-should-use-it
    (I assume you are refering to the implementation discussed on that page)

    Though I never used PJAX yet I can give you some tipps to find out more about the issue:

    First, PJAX uses AJAX requests to fetch data from WordPress. This seems to be the problem here, so please check the URL that the PJAX script calls. Is it a admin-ajax.php call or does it actually request the real page?

    I assume it does not request the real page, so WordPress cannot correctly determine which page the user actually wants and uses some defaults (default sidebars, default page template, etc) for the page.

    You can also try to switch to the default theme Twentyfifteen and check if PJAX works with that theme. It is possible that complex themes have some kind of own logic that is not compatible with this kind of AJAX calls…

    Also if you can share a link to a demo page that does not work we’ll check it out for you and possibly can pinpoint the issue much faster this way 😉

    Thanks, Philipp (WPMU DEV)

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

The topic ‘Custom Sidebar not initialized when using PJAX’ is closed to new replies.