• It appears that the OceanWP modals are loaded on all pages, which is bad for page load performance. Could you please advise how to only load the modals used on each page? or provide an option to specify which page(s) a modal should be loaded on.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Amit Singh

    (@apprimit)

    Hello,

    Sorry for the late response. This is how the modal works in oceanwp. We will consider your suggestion and try to fix it in the future version of the plugin.

    I made my own solution (I had to modify the plugin) but that topic got deleted, unfortunately !

    @apprimit – Surely just load it where it’s needed? I tried to put a form in a modal, but then started getting errors on every page, which prevented other jQuery scripts from loading, unless I loaded all the scripts the form’s plugin also required. For each modal I create, I always have to load all dependencies throughout the site… seems a bit silly to me.

    @hajar2901 – How did you sort this?

    Hi @hshah, you need to replace the function modal_display() in ocean-modal-window.php with the one that I am sharing with you via this link CODEPILE

    • This reply was modified 4 years, 8 months ago by Word.

    @hajar2901

    Thanks ??

    @hshah No problem ??

    • This reply was modified 4 years, 8 months ago by Word.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modals loaded on all pages’ is closed to new replies.