-
AuthorPosts
-
October 31, 2025 at 6:44 pm #1490822
Hallo zusammen!
Ich habe die Schritte wie in https://kriesi.at/support/topic/pop-up-lightbox/#post-1429407 beschrieben umgesetzt und dann den Shortcode von einem Formular eingefügt. Mein Ziel ist es, ein Formular in einem Popup anzuzeigen, wenn man auf einen Button klickt.
Also:
function magnific_popup_with_no_scroll_and_button() { ?> <script> (function($) { $(window).on('load', function(){ $('.open-popup-button a').addClass('open-popup-link'); $('.open-popup-link').addClass('no-scroll'); $('.open-popup-link').magnificPopup({ type:'inline', midClick: true, callbacks: { beforeOpen: function () { $('body').css("overflow-y", "hidden"); }, close: function() { $('body').css("overflow-y", "auto"); }, }, }); }); })(jQuery); </script> <?php } add_action( 'wp_footer', 'magnific_popup_with_no_scroll_and_button', 99 );Das in die functions.php eingesetzt.
Eine Code-Box mit folgendem Inhalt erstellt:
<div id="open-popup" class="popup mfp-hide"> <p>[av_layout_template template_id='popform']</p> </div>Und auch das im Quick-CSS hinzugefügt:
.popup { position: relative; background: #FFF; padding: 20px; width: auto; max-width: 500px; margin: 20px auto; }Weil es nicht funktioniert hat habe ich auch das noch hinzugefügt:
add_filter('avia_allow_shortcodes_in_codeblock', '__return_true'); add_filter('avf_alb_support_modal_templates', '__return_true');Leider funktioniert es nicht. Es öffnet sich ein Modal aber darin steht nur der Shortcode. Ich bin ratlos. Kann mir bitte jemand dabei helfen das hinzubekommen.
Link zur Testseite im PC.
-
This topic was modified 3 weeks, 2 days ago by
felix_frank.
-
This topic was modified 3 weeks, 2 days ago by
felix_frank.
November 10, 2025 at 4:17 am #1491094Hey felix_frank,
Thank you for the inquiry.
Unfortunately, it’s not possible to use a custom layout as a shortcode (av_layout_template) outside of the builder. You may need to copy the html generated by the layout shortcode and use it instead of the custom layout shortcode.
Best regards,
IsmaelNovember 10, 2025 at 7:40 am #1491097place your contact form inside a 1/1 container.
give a custom ID to that 1/1 container e.g. my-contactform
give a custom class to that 1/1 container mfp-hide
place a button on your site – with manual link : #my-contactform – and custom class: open-popup-link
(because custom class of the button goes to its wrapper the selector .open-popup-link a will work.btw. in the meantime you do not need this callback .
if you place inside your child-theme functions.php :add_filter( 'avf_default_lightbox_no_scroll', '__return_true' ); -
This topic was modified 3 weeks, 2 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
