Title: Enqueue Plugin on regular page
Last modified: February 27, 2017

---

# Enqueue Plugin on regular page

 *  [Gtru1021](https://wordpress.org/support/users/gtru1021/)
 * (@gtru1021)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/)
 * 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)

 *  [akyusa01](https://wordpress.org/support/users/akyusa01/)
 * (@akyusa01)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/#post-8854397)
 * 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](https://wordpress.org/support/users/gtru1021/)
 * (@gtru1021)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/#post-8855286)
 * 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](https://wordpress.org/support/users/gtru1021/)
 * (@gtru1021)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/#post-8855304)
 * 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 9 years, 3 months ago by [Gtru1021](https://wordpress.org/support/users/gtru1021/).
    -  This reply was modified 9 years, 3 months ago by [Gtru1021](https://wordpress.org/support/users/gtru1021/).
 *  [akyusa01](https://wordpress.org/support/users/akyusa01/)
 * (@akyusa01)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/#post-8879405)
 * 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.

 * ![](https://ps.w.org/envira-gallery-lite/assets/icon-256x256.png?rev=2022837)
 * [Envira Gallery - Image Photo Gallery, Albums, Video Gallery, Slideshows & More](https://wordpress.org/plugins/envira-gallery-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/envira-gallery-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/envira-gallery-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/envira-gallery-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/envira-gallery-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/envira-gallery-lite/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [akyusa01](https://wordpress.org/support/users/akyusa01/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/enqueue-plugin-on-regular-page/#post-8879405)
 * Status: not a support question