Pods AJAX Views

Pods AJAX Views

Wordpress plugin

Install on Wordpress

App Details

Pods AJAX Views offers an easy way to generate cached views from AJAX when they haven’t been cached yet. It will serve straight from cache and output on the page if the view has already been generated.

This plugin requires the Pods Framework version 2.4.1 or later to run.

Why AJAX Views?

If you are using pods_view to cache template output, you’re already on the right track to improving performance of your site through it’s powerful Partial Page Caching. However, what if you have a complicated view that may take a few seconds to generate? What if you have a few of those views on the same page?

On hosts like WPEngine, there’s a strict 30 second limit and then a 502 server error is sent to the visitor. Waiting a long time for a page to load, or especially being sent a server error like that just isn’t acceptable for visitors and they may choose to bail on your site.

Pods AJAX Views takes those complicated views and lets you off-load them into a separate asynchronous AJAX call that allows the rest of the page to be built and sent to the browser. When the AJAX request runs, the view is cached like normal, so subsequent calls to the Pods AJAX View code will produce the exact same result as a default pods_view would.

Usage

Use the same way as pods_view, it accepts the same arguments, except one additional argument $forced_regenerate at the end which can be set to true (default: false) that will force the view to be deleted from cache and reloaded.

pods_ajax_view( 'my-big-cached-template.php' ); 

AJAX requests are done through the same URL, so you still have access to the query and postdata like normal. We hook into template_redirect to stop Beware that AJAXed views are loaded from AJAX, not through the current page. They do not have access to the current WP_Query or Query variables, or the Post loop. If you want to pass anything into it, use the $data argument.

For information about pods_view, see these resources:

Available Constants

  • define( 'PODS_AJAX_VIEWS_STATS', true ) – Creates a table for Stats tracking and regeneration ability; Must be enabled before activating, if you enable it, just deactivate / activate again
  • define( 'PODS_AJAX_VIEWS_OVERRIDE', true ) – Overrides all pods_view() calls in the theme and turns them into AJAX views, even if they aren’t set to cache (it’ll load the non-cached version via AJAX)
  • define( 'PODS_AJAX_VIEWS_API_KEY', 'abcdefghijk' ) – This should be highly randomized, it’s the API key used to access the sitemap at yoursite.com/?pods_ajax_view_action=view_sitemap&pods_ajax_view_api_key=XXXX which must be accessed through the user (or anon) the regeneration will be run as because the URLs are specific to the user and have nonces on them; You can use this with a plugin like Warm Cache to keep your views fresh and always generated
  • define( 'PODS_AJAX_VIEWS_SITEMAP_LIMIT', -1 ) – You can override how many sitemap items will show, default is 250

Contributors

Check out our GitHub for a list of contributors, or search our GitHub issues to see everyone involved in adding features, fixing bugs, or reporting issues/testing.

github.com/pods-framework/pods-ajax-views/graphs/contributors

Pricing

Starting from $0 per month.

Check Out the Pinterest Feed Widget

By Common Ninja

Pinterest FeedTry For Free!

App Info

Rating

Reviewers

No reviews

Tags

ajax
pods

Developed By

Scott Kingsley Clark

Quick & Easy

Find the Best Wordpress plugins for you

Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!

Testimonial

Testimonial plugins for Wordpress

Galleries

Galleries plugins for Wordpress

SEO

SEO plugins for Wordpress

Contact Form

Contact Form plugins for Wordpress

Forms

Forms plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Sliders

Sliders plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Comments

Comments plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Maps

Maps plugins for Wordpress

Security

Security plugins for Wordpress

Translation

Translation plugins for Wordpress

Ads

Ads plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Music Player

Music Player plugins for Wordpress

Backup

Backup plugins for Wordpress

Privacy

Privacy plugins for Wordpress

Optimize

Optimize plugins for Wordpress

Chat

Chat plugins for Wordpress

Countdown

Countdown plugins for Wordpress

Email Marketing

Email Marketing plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Membership

Membership plugins for Wordpress

popup

popup plugins for Wordpress

SiteMap

SiteMap plugins for Wordpress

Payment

Payment plugins for Wordpress

Coming Soon

Coming Soon plugins for Wordpress

Ecommerce

Ecommerce plugins for Wordpress

Customer Support

Customer Support plugins for Wordpress

Inventory

Inventory plugins for Wordpress

Video Player

Video Player plugins for Wordpress

Testimonials

Testimonials plugins for Wordpress

Tabs

Tabs plugins for Wordpress

Social Sharing

Social Sharing plugins for Wordpress

Social Feeds

Social Feeds plugins for Wordpress

Slider

Slider plugins for Wordpress

Reviews

Reviews plugins for Wordpress

Portfolio

Portfolio plugins for Wordpress

Membership

Membership plugins for Wordpress

Forms

Forms plugins for Wordpress

Events Calendar

Events Calendar plugins for Wordpress

Contact

Contact plugins for Wordpress

Comments

Comments plugins for Wordpress

Analytics

Analytics plugins for Wordpress

Common Ninja Apps

Some of the best Common Ninja plugins for Wordpress

Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.

Pinterest Feed for Wordpress logo

Pinterest Feed

Show Pinterest content in a Pinterest feed that keeps your page visually engaging, highlights new ideas, and helps visitors explore fresh inspiration.

GDPR Cookie Notice for Wordpress logo

GDPR Cookie Notice

Show a GDPR-ready cookie notice that clearly explains how cookies are used, helping you stay compliant while creating a more transparent experience for your visitors.

Personality Quiz for Wordpress logo

Personality Quiz

Create interactive personality quizzes with custom results and flexible design to boost engagement and help visitors explore tailored outcomes easily.

Ratio for Wordpress logo

Ratio

Create interactive infographics with a ratio widget that uses custom icons, dynamic tooltips, and clear visuals to help visitors understand data quickly.

Image Stack Gallery for Wordpress logo

Image Stack Gallery

Showcase photos with an image stack gallery that layers images in a stacked display with smooth transitions to create a visually striking presentation.

PDF Flipbook for Wordpress logo

PDF Flipbook

Transform PDFs into interactive flipbooks with a PDF flipbook widget that improves reading and keeps visitors engaged.

Accessibility for Wordpress logo

Accessibility

Make Your Website More Inclusive and Accessible

Back to Top Button for Wordpress logo

Back to Top Button

Back to top button that improves navigation, speeds up browsing, and helps visitors move smoothly through long pages for a better user experience.

Bracket Maker for Wordpress logo

Bracket Maker

Bracket generator for creating interactive tournaments that organize matchups, track progress, and deliver a clear and engaging competition experience.

Medium Feed for Wordpress logo

Medium Feed

Show Medium articles in a Medium feed that keeps content fresh, improves readability, and helps visitors discover more posts.

Image Poll for Wordpress logo

Image Poll

Create interactive image polls that use compelling visuals to boost engagement, gather feedback, and help visitors vote easily.

Catalog for Wordpress logo

Catalog

Create and customize product catalogs with a catalog widget that organizes items clearly, improves browsing, and helps visitors explore your offerings easily.

Discover Apps By Platform

Discover the best apps for your website

WordPress
Wix
Shopify
Weebly
Webflow
Joomla
PrestaShop
Shift4Shop
WebsiteX5
MODX
Opencart
NopCommerce

Common Ninja Search Engine

The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!

Multiple platforms