How to Enable AJAX Loading for WordPress Patterns in Nexter Blocks?

Key Takeaways

  • Nexter Blocks features AJAX Templates that improve page load time by loading Patterns on viewport, click, or hover instead of during initial load.
  • Users activate AJAX loading by enabling the Enable Ajax Templates option in Nexter u2192 Extra Options u2192 Settings.
  • Nexter Blocks provides three CSS classes for AJAX loading: Hover trigger, Click trigger, and On view trigger for different loading methods.
  • Patterns can be loaded on mouse hover or click by adding the corresponding class name in the ADDITIONAL CSS CLASS(ES) field of the Advanced tab.
Table of Contents

You can convert any type of layout into a WordPress Pattern and use it multiple times on your site. While this is a great feature but adding multiple Patterns with complex layouts, especially with images on a page can impact the page load time.

With the AJAX Templates feature from Nexter Blocks, you can make the Patterns load on the viewport, on click or hover instead of loading on the initial page load, thus improving the page load time.

Activate the Enable Ajax Templates

To use the AJAX load feature, you have to enable the Enable Ajax Templates option.

To do so, go to

  • Nexter Extra Options Settings.
  • Go to the Enable Ajax Templates section and enable the toggle.
  • Then click on the Save Settings button to save the settings.

ajax templates activation new

How to Use the AJAX Templates Feature?

First, make sure you’ve created at least one WordPress Pattern, once done

From the Dashboard, go to Nexter > Patterns.

Then scroll down to the Pattern that you want to load with AJAX, and click on the AJAX Shortcodes button.

ajax templates ajax shortcodes new

It will open a popup, in the Shortcode for Ajax render: field you’ll find the shortcode that you have to use on the location where you want the Pattern to load with AJAX.

ajax templates ajax shortcodes render


In the AJAX Class section, you’ll find three CSS classes – 

Hover trigger: With this class, you can load the pattern on mouse hover.

Click trigger: With this class, you can load the pattern on click.

On view trigger: With this class, the pattern will load on entering the viewport.

Use the class as per your requirements.

Load Pattern On Mouse Hover

To load a WordPress Pattern on mouse hover, follow the steps – 

1. Add the WordPress Shortcode block and add the shortcode of the Pattern where you want to load it.

2. Then add the element to the same location, hovering on which you want to load the Pattern.

For instance, we will use the Button block from Nexter Blocks.

3. Go to the Advanced tab, and add the Hover trigger class name from the Pattern shortcode popup, in the ADDITIONAL CSS CLASS(ES) field. 

Now the Pattern will load once you mouse hover the button.

Load Pattern On Mouse Click

To load a WordPress Pattern on mouse click, follow the steps – 

1. Add the WordPress Shortcode block and add the shortcode of the Pattern where you want to load it.

2. Then add the element to the same location, by clicking on which you want to load the Pattern.

For instance, we will use the Button block from Nexter Blocks.

3. Go to the Advanced tab, and add the Click trigger class name from the Pattern shortcode popup, in the ADDITIONAL CSS CLASS(ES) field. 

Now the Pattern will load once you click the button.

Load Pattern On Viewport

To load a WordPress Pattern on the viewport, follow the steps –

1. Open the page, post or template in the WordPress editor where you want to load the Pattern. Add a container. 

For instance, we’ll use the Container block from Nexter Blocks here.

2. Then add the WordPress Shortcode block and add the shortcode of the Pattern.

3. Now select the container containing the shortcode and go to the Advanced tab and add the On view trigger class name from the Pattern shortcode popup, in the ADDITIONAL CSS CLASS(ES) field.

Note: Although the view trigger will work on other elements as well, but it is ideal to use it on a container. 

That’s it, now the Pattern will only load once it enters the viewport. 

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What should I do if AJAX loading is not working for my WordPress Patterns?

If AJAX loading isn't functioning, first ensure that you've enabled the 'Enable Ajax Templates' option in the Nexter settings. Go to Nexter u2192 Extra Options u2192 Settings, find the Enable Ajax Templates section, and toggle it on. If it's enabled but still not working, double-check that you've added the correct AJAX class to your shortcode in the Advanced tab.

What is the best way to improve page load time when using multiple Patterns?

Using the AJAX Templates feature in Nexter Blocks is the best practice for improving page load time with multiple Patterns. By enabling AJAX loading, Patterns can load only when they enter the viewport, on click, or on hover, rather than during the initial page load. This reduces the overall load on the page and enhances user experience.

How can I load a WordPress Pattern when it enters the viewport?

To load a WordPress Pattern upon entering the viewport, add a container in your page or post, then insert the WordPress Shortcode block with the Pattern shortcode. Select the container, go to the Advanced tab, and add the On view trigger class from the Pattern shortcode popup. This method is efficient as it only loads the Pattern when it becomes visible to the user.

What happens if I forget to save the settings after enabling AJAX loading?

If you forget to save the settings after enabling AJAX loading, the changes won't take effect. This means that your Patterns will continue to load as they did before, potentially impacting page load time. Always ensure to click the Save Settings button after making changes in the Nexter settings to apply the AJAX loading feature.

Last reviewed: April 14, 2026

Related Docs