In the footer of this site: https://www.exactech.fr/ I would like a Modal to popup based on links in footer to tell user they are leaving the site. I saw how to do that in the FAQs
How can I make Modal Dialog open when I click on a button or a link?
Add the onclick property to your link or button code and call the
modal_dialog_open()
function.
<a href="#" onclick="modal_dialog_open();" title="Learn More">Learn More</a>
<button onclick="modal_dialog_open();">Open Modal</button>
But we already are using a Modal on some other pages. How can I create another Modal in the settings area? I dont see anywhere to “add new” or “create new”
]]>We’re trying to add a popup for a charity event we’ve got coming up, but it seems to not be working at all.
jQuery includes
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-includes/js/jquery/jquery.min.js?ver=3.6.4' id='jquery-core-js'></script>
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.0' id='jquery-migrate-js'></script>
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-content/plugins/modal-dialog/cookie.js?ver=1.0' id='jquerycookies-js'></script>
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-content/plugins/modal-dialog/detectmobilebrowser.js?ver=1.0' id='jqueryDetectMobile-js'></script>
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-content/plugins/modal-dialog/colorbox/jquery.colorbox-min.js?ver=1.5.6' id='colorboxpack-js'></script>
<script type='text/javascript' src='https://ironhousefitnessct.com/wp-content/themes/zerif-lite/js/jquery.knob.js?ver=1.8.5.49' id='zerif_knob_nav-js'></script>
Unless I’m mistaken, Modal Dialog is using the earliest version of jQuery listed (1.5.6), which should be compatible with the later versions used by our theme (1.8.5.49) or WordPress (3.6.4).
wp_head and wp_footer
I’m guessing this is the problem, as they do not appear in our theme’s style.css file. The theme was heavily modified by our original developer, who we are unable to contact. And, I am not a WordPress guru by any stretch of the imagination. Is there a workaround for this?
Third Possibility
I may have gotten ahead of myself and modified the dialog’s settings away from default. So, it’s possible one of my changes is causing the problem.
Any help you could please provide would be greatly appreciated.
Thanks!
]]>Hello,
i have this link:
and i want to show popup only on specific part of urls, like “search_4=Internet”…
Can you add a feature for detecting url parts and add this to work properly only on urls that have search_4=”Internet”
I like your plugin but i need this option to use in the future.. The url above can have different options, but search_4=Internet will stay unmodified…
]]>Hello Yannick,
I was wondering if and how I could add a sandbox attribute to your script.
I ask this because I would like to add a external webpage with script to the dialog.
This initialy works fine but due to the external script it causes problem with the navigation menu (browsing the navigation menu) and with the back and forward button of several browsers like Chrome and Edge..
Now I know that when I use that website script inside an iframe I can resolve the issue by adding the Sandbox attribute with certain values.
But how do I add that attribute ( or something similar) to your plugin configuration?
If you would like to know more or an example I will set it up on a test website.
Thanks in advance and kind regards,
Ed.
]]>Hello. Prompt how to make that the window was shown only for one or two pages? what exactly and where to write?
]]>Hi there,
I only enabled the plugin for a client to play with it. Before leaving the page I saw that a dialog opened with an ad for https://ici.radio-canada.ca/. That was reason enough for me to remove the plugin again.
From your code, I assume that you didn’t intend bad and rather wanted to provide a good example. However, this could also count as a violation of the plugin guidelines so I would kindly ask you to change it. Maybe you could ask new users if they would like to enable an example.
Thanks,
Thomas
dialog doesn’t display
things i tried…
* switch .htaccess from secure to default (Bullet-proof Security plugin)
* checked the source for ‘jquery’ – the resource appears to be loaded from the default WP install
* tried a clean browser profile (Firefox)
* used a couple of testing sites that take screen-shots (dialog didn’t appear on them, but i can’t be sure they had JS enabled)
* check browser console – getting TypeError: jQuery.cookie is not a function
but i have no idea what’s generating it
the code is present in the source (or at least some of it is)
dialog is titled “test” and content should be “hello!”
]]>Hi there,
I created a homepage welcome box with the modal dialogue plugin but it is not working in Safari.
Everything works great in Chrome, but in Safari the URL content configured in the modal dialogue settings fails to load.
Can you help?
]]>Nice plugin but I have 2 questions for setting up it.
1. How to enable the dialog but not show it automatically after certain delay?
I want to show it when user clicks on certain link. Right now I set it to be a large number to avoid automatically pop up.
2. When there’s multiple active dialogs, dialog behavior looks weird. Can I have 1 dialog shown automatically after 3s. Then show another dialog when user clicks on a link?
]]>Hi,
The modal dialog used to work on my site until I updated to the latest version. Now it won’t display on any page. I’ve tried disabling all other plugins but no results there.
I’ve also tried setting the modal dialog in the post edit page, specifying a specific post ID, just leaving it blank to display on all pages and any other variation I could think of but it’s still not displaying.
The site (and page) I’m trying to get this to work is https://adriancrook.com/a-practical-free-to-play-game-economy-design-example/.
Any ideas?
Thanks.
]]>Hi,
I’ve used your plugin before on an old website, but when trying to set it up on a new website, I can’t get the modal to show up.
The site is https://www.timberlineacademy.com.
I’ve tried deactivating all other plugins, and that didn’t help.
I also tried to add wp_footer() to my themes header, and that didn’t fix it either.
I added the line
<?php wp_footer(); ?>
below the line
<?php wp_head(); ?>
in my theme’s header.php file, which both come right before the </head> tag.
Any ideas on other things I can try?
Thanks a ton
]]>Hi all,
I’m pretty new to PHP.
I want the Modal to show on page with ID 371 when a variable has a specific value.
Say on page ID 371 I have set:
$modal = 'A';
Then in the settings of the Modal I set at the PHP Condition line:
if($modal == 'A');
Changing the variable on that page to, say, ‘B’, that doesn’t make any difference.
The modal keeps showing up.
I have checked the ‘Only show on specific pages and single posts’ and specified the page ID 371 on ‘Pages and posts to display Modal Dialog ‘.
Any clues anyone?
I used the following code:
jQuery(document).ready(function() {
jQuery(“a#openmodal”).click(function() {
jQuery(“a#inline”).trigger(‘click’);
});
});
to open the modal this link:
<a id="openmodal" href="#">Open Modal</a>
this error is given:
“scripts.js:1 element query css parsed”
I use Jupiter Theme
]]>I need to display dialog only if is_tax(‘video_categories’, ’18’) is true, how to achieve this?
If I add this line under ‘PHP Condition string’ then still modal dialog is displayed everywhere.
-Only loads on homepage once per visitor?
-Once, visited, modal dialog won’t pop up at all.
How do I set my configurations so it’d match my conditions?
So i got this problem, i can assign Modals to certain pages correctly, but when i want to leave any pages without Modals it just shows one of the others, even if the Modal Display to Display is set to None.
]]>Hi,
I can’t seem to get the modal to display at home? I’m I don’t something wrong?
]]>Has the version of Modal Dialog been released that allows triggering different Modals on a page? Or is it still a beta?
And if it is still beta, may I access it?
]]>Hello,
I have the option set to resize the window, which works for the mobile version of my site, the it doesn’t resize the text and graphic within the window (I’m using customer HTML).
Is there another setting that will resize both the window and the content? Is there a way to do this with JScrip within the HTML settings area?
Everything works great on a larger monitor, but the experience on mobile is what I am trying to solve.
BTW, great plugin and I have donated a while back ??
Pat
]]>I have added the post id to the config file but it isn’t showing that post. What am I missing?
Thx
Hello,
Having a slight issue with the modal dialog (great plugin by the way) appearing on mobile. I have it set to open when clicking a specific menu item which is inside a dropdown on the nav bar. I used this post as a guidline: https://www.ads-software.com/support/topic/modal-dialog-on-wp-menu-link
It works fine on desktop but there is no response on mobile. The disable option for showing on mobile is unchecked also. Perhaps it could be because I have the js code placed within the page itself and the footer.php? I wasn’t sure exactly where to place it.
That’s the code I’ve used.
<script type="text/javascript">
jQuery( "#menu-item-1063" ).click(function() {
modal_dialog_open();
});
</script>
Any help would be very much appreciated.
Regards,
Christos
]]>Hello Yannick,
I’m having issues with the modal constantly displaying even though a cookie has been set.
The use case would be a user would access this page:
https://ppg-004.frankandvictor.com/cxo-toolkit/
Enter their information and a cookie would be set for 365 days that would allow them to access the content on page.
The problem I’m experiencing is that the modal still displays regardless of the cookie being set.
Is there a way to ONLY display the modal if a cookie is not present for a user. Once the cookie is set the modal should no longer display for the user on a designated page for expire amount ie.. 365 days.
]]>How to Trigger Modal Dialog via Button/Anchor after appearing on page load.
Could it be?
Hi,
Is there a way to resize the window height and width using css somewhere?
Thanks!
]]>Before updating to Latest version, Modal Dialog was working fine. But after updating, it just stopped working. I even not changed any configuration setting. bccfalna.com is the site I am using this plugin on.
]]>Hello, thank you for your great plugin. I have a problem. I want to see my modal after click at link at footer of my page. When I wrote:
<a href="#" onClick="modal_dialog_open()" rel="nofollow">teste</a>
I have scroll my browser to top of page and nothing. How I can resolve that problem? Thanks!
]]>I have the subscriber pop-up code from a mailchimp list in Modal.
The popup *looks* perfect, but the fields to add email and name, and the subscribe button, are not working.
Upon closing the pop up, the menu bar on my website becomes disabled, ie the links no longer work.
My site is https://www.thesugardoctor.com.au
]]>My subscription form is displaying two boxes that can be typed in but they are not properly labeled. Above one of them is says: Email Address, and the second box is directly below that one and there is no label on it as to what it is for. I would like to ask for their name and email address. I am using Modal Dialog in conjunction with Tribulent’s Newsletter plugin.
How do I label the boxes?
Here is the site: Shelley Scales.com
Thanks for your help.
]]>I would like the Modal Dialog to open when a custom WP menu link is clicked. So it would be an onclick event and on my specific menu li id of “menu-item-13874”. I’m not sure how to add that to the configurations. If it helps, the custom menu only has that one link and the entire menu has the id of “module-menu-footer” with the class of “single-depth-menu”. I can adjust the ID and class if need be.
]]>will this plug in allow me to create an age verification box that will come up automatically when anyone tries to enter my site from any of my page links. I just want it so they have to click on YES to enter or NO and will exit. I want to be able to put my logo and preferably would like to be able to customize the buttons, size, color etc. Would this plug in do that without me knowing any code? I am using the latest WP and mystile theme with woocommerce. thank you.
]]>