Dear Kriesi-team,
somehow adding menu items being placed in the secondary menu with individual links (site internal) and adding ?iframe=true does not trigger the links to be opened in the lightbox.
I checked the output and found class “mfp-iframe” being added to the a-tag, but in opposite to the same links in the footer menue, class “ligthbox-added” is not set. I already wrote a short jQuery to add both classes to selector #header_meta a[href*=”?iframe=true”], which works ok, but the link still does not open in the lightbox.
How can I achieve this effect for links having ?iframe=true in #header, #header_meta and or #header_main?
Thank You
Hi mailworm,
Could you post a link to the site in question so that we can take a closer look please?
Thanks,
Rikard
Here You are (see private content)..
Hi!
Please post the login details here so that we can check the settings. Or try this in the functions.php file:
// custom script
add_action( 'wp_footer', 'ava_custom_script' );
function ava_custom_script() {
?>
<script type="text/javascript">
(function($) {
function b() {
$("#header_meta a").magnificPopup({
type: 'iframe',
mainClass: 'avia-popup mfp-zoom-in',
});
}
$(window).load(function() {
b();
});
})(jQuery);
</script>
<?php
}
Regards,
Ismael
Ismael,
thanks, this did it!