• Hello,

    I am working on an infinite scroll feature for a client blog. The client has your plugin installed and it works wonderfully on the single Posts.

    I cannot however find a way to enqueue the proper files to a specific template page to ensure it is working with the infinite scroll feature I am creating.

    Would you be able to tell me what scripts I would need to enqueue on the blog.php template I am creating?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi ??

    The Envira scripts will only load on a page if the shortcode is present. So if the Blog index page shows an Envira gallery before the ‘more’ tag – you shouldn’t have to enqueue anything.

    I suppose it would depend on how you are calling the content of the posts into the blog index page?

    Thread Starter Gtru1021

    (@gtru1021)

    Below is the structure of the infinite scrolling blog.

    blog.php is populated by blog-loop.php with the 3 most recent posts.
    As the user scrolls down half the page, an ajax call is made to blog-loop.php to get the next three posts.

    The blog.php template shows the entire post, so the user does not click to a single.php.

    Would there be a way to show an empty gallery so it enqueues the correct scripts onto the page?

    Thank you very much for your assistance.

    Thread Starter Gtru1021

    (@gtru1021)

    I tested an empty gallery in the template page and the scripts do not enqueue for me.

    When using a gallery with images I get the scripts enqueueing.

    Ideally I’d like to be able to use use the ‘wp_enqueue_scripts’ hook to enqueue the scripts needed to the blog.php page.

    When the scripts are being loaded on the blog.php page, each post, brought in via ajax, containing a gallery loads with opacity of 0 and the masonry layout is broken.

    Is there a function I need to trigger after loading a post with a gallery via ajax?

    Thanks again.

    • This reply was modified 8 years, 1 month ago by Gtru1021.
    • This reply was modified 8 years, 1 month ago by Gtru1021.
    akyusa01

    (@akyusa01)

    Hi ??

    Unfortunately this is not currently possible. I had to reach out to the developer to confirm this (due to Ajax)

    I’ve opened up a ticket with the developers to correct this, but I don’t have an ETA on when that will be updated, but he will be looking into it.

    Can I help with anything else?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Enqueue Plugin on regular page’ is closed to new replies.