Okay
  Public Ticket #3226076
Custom content not loading properly when "Load pages with ajax" is enabled
Closed

Comments

  •  2
    David Ugarkovic started the conversation
    1779413620.pngThis is supposed to be a timeline, and this is just an example how it appears

    Hello,

    I've been creating my portfolio website on localhost recently, and I noticed that when I navigate to another page of the website when "Load pages with ajax" is enabled, the elements that I created either with third-party plugins, shortcodes or even custom content with built in WP elements are not always appearing properly. When I clear cache (CMD+SHIFT+R), the elements appear just fine.

    I was wondering if that is some caching issue, but I'm not sure how to deal with it. I absolutely love the theme's built-in AJAX loading, so I would like to include it in the website, while keeping the custom elements.


  •  1,810
    Support replied

    Hello David,

    thing is that we cannot guarantee any third party plugins will work with ajax enabled. That's we encourage to use our shortcodes/gutenberg blocks that are guaranteed to work with ajax.

    Ajax page transitions will load the target page content container within the original page. Since the target page is not loaded normally, the <head> and <body> elements will stay the same.

    Since a lot of plugins are using javascript initialisation in the head (or the footer) of the page they don't get called in the target page.

    if you are a familiar with a plugin you can enqueue the necessary .js and .css files and do any js init is required inside AJAX calls. See childcript.hs of the child theme inside the main archive

    https://prnt.sc/fK6DaVd4t_0N

    This is an example for WPBakery Page builder

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy