• Resolved TRDD

    (@traceyrickard)


    Hello

    I have a set of featured images on an archive page and I use this link to open the modal. <p><a href="#" class="eModal-<?php the_field( "emodal_number" ); ?>">View Video ?</a> Obviously the modal number goes in a custom field.

    The only way I can get it to work is to load the modals on all pages, but I just want them to load on the archive page. Loading on all pages is too much, there are about 25 modals. Is there a way to specify the particular page eg. if is page x then load the modals?

    Thanks

    https://www.ads-software.com/plugins/easy-modal/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    Hmm. I think the new functions I’ve been thinking up would help you. Allows queuing of a modal from a php function.

    Another option is to even hardcore the modal in to the footer temporarily until there is an update.

    The JS will work with self added modals. Simply add the id of eModal-ID and any link with a class matching that ID will load and should get settings of your modal.

    Thread Starter TRDD

    (@traceyrickard)

    Thanks but that doesn’t really help when the user adds a new one, they would never do this. I think I will leave it for now.

    Plugin Author Daniel Iser

    (@danieliser)

    We are adding ajax functionality in the next major update. This will mean modals don’t have to be pre-loaded.

    Basically only some modals need to be preloaded. Any with other plugins that rely heavily on JS like gravity forms etc need to be preloaded.

    Any item with an eModal class that doesnt match a loaded modal will default to loading the modals content via ajax. This may solve your issue when that update comes out in a month or so.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Load Easy Modal on Archive Page Only’ is closed to new replies.