-
AuthorPosts
-
April 28, 2021 at 9:34 pm #1297224
Hello! Thank you in advance for any help you can provide.
I have followed this tutorial, https://www.youtube.com/watch?v=ezR27jB7zL8 as well as read about this in the form, but have not been successful. When I set it up, nothing happens.Here is what I’ve tried:
1. I added this to my child theme:
function inline_popup_enabler(){
?>
<script>
(function($){
$(window).load(function() {
$(‘.inline_popup’).magnificPopup({
type:’inline’,
midClick: true
});
});
})(jQuery);
</script>
<?php
}
add_action(‘wp_footer’, ‘inline_popup_enabler’);2. and this is what I put on the page itself:
A. This is my text link to the anchor:
Sherry Bonanno
(This gets lost when I submit, so here it is without the a, /a :)
class=”inline_popup” href=”#sherry-bonanno”>Sherry BonannoB. These are my color section Developer Settings for the anchor itself:
Custom ID Attribute: sherry-bonnano
Custom CSS Class: mfp-hideDetails: Within this color section I have a special heading, and two columns containing a text block and image. this should display in the lightbox popup, but it simply remains hidden.
Kind Regards,
Doug- This topic was modified 3 years, 6 months ago by doug123. Reason: added some details
May 1, 2021 at 12:05 am #1297648Hi – just thought I’d check in to see if you have any thoughts about the above?
Thank you!
May 3, 2021 at 8:18 am #1297929Hi,
Thank you for the inquiry.
We may need to actually inspect the page in order to check if there is any causing the lightbox to not fire correctly. Please post the URL in the private field.
Have you tried adding a priority number to the wp_footer hook?
add_action("wp_footer", "inline_popup_enabler", 9999);
Best regards,
IsmaelMay 3, 2021 at 7:34 pm #1298083Thank you Ismael!
no, that didn’t work. when I add your line to the child theme’s functions.php, the 9999 becomes dashes, and doesn’t make it work.
May 5, 2021 at 4:19 am #1298399Hi,
Thanks for the update.
We cannot find the inline popup in the home page. Where did you add it? Please provide a direct link to the page.
the 9999 becomes dashes
That is new. Would you mind providing a screenshot? Please use imgur or dropbox.
Best regards,
IsmaelMay 5, 2021 at 4:25 am #1298401Hi,
UPDATE: We edited the code in the functions.php file a bit and created a test page. (see private field)
Best regards,
IsmaelMay 5, 2021 at 4:26 am #1298402Hi,
UPDATE: We edited the code in the functions.php file a bit and created a test page. (see private field)
Best regards,
IsmaelMay 5, 2021 at 7:58 pm #1298684Hey Ismael! Thank you – the popup has no margins though, Whereas a normal gallery image popup does have left, right, top, bottom margins. Can margins be added just like those on an image lightbox?
The problem is that the color section popup covers the entire browser screen, so I might as well be using a separate page instead of a lightbox.Please see the test page you created. I have added some test content for example of what I mean. It just really needs margins like those on image lightboxes.
I’d really like to use the Enfold popup solution rather than a plugin.
thank you again for all your efforts! I really appreciate it.
May 7, 2021 at 9:59 am #1298892Hi,
Thank you for the update.
You can adjust the style of lightbox container so that it only takes a percentage of the screen instead of depending on the content. Try to use this css code.
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content { width: 80%; margin: 50px; }
We also added a 50px margin around the lightbox container.
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.