A more performant way to handle numerous modal loopers?

I need to loop through a large number of CPTs and show the dynamic content in a modal - the example page can be seen here - building a map feature with a CPT for locations but I want to be able to create and the modal/popup through Cornerstone. Obviously, outputting html for 100 hidden modals is not a great idea. Is it possible to re-populate or freshly render a single modal element on the fly with the looper provider (post ID) being supplied through the data-toggle click event?

There is currently no in app way to update a single modal with multiple points of data. You would need to write some JS to handle that currently and start targeting custom attributes.

If you turn on “Dynamic Rendering” in your modals, this will at least prevent any iframe from loading or content from rendering until a modal has loaded speeding up your page.

Have a great day.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.