-
AuthorPosts
-
February 9, 2021 at 1:00 am #1278878
Hi there,
I am using Popup Maker plugin #popmake-117 shortcode in a button that doesn’t open the popup but instead takes me to the top of the page.
I’m using #anchors for a single page website navigation and wondered if this might be interfering with the popup code?I’ve managed to get a text link to show the popup correctly using <span class=”popmake-117″> so it’s not the actual popup setup (and the popup also works fine from the front end Admin Popup Maker menu). This is the VIEW VANESSA’S EXPERIENCE HIGHLIGHTS example in the About section – https://wordpress-364189-1297988.cloudwaysapps.com/#about
The button example is at the very bottom of the page shown as a red button “CLICK ME”
Any ideas what might be going wrong? I did have this popup working in a button about 8 months ago.
February 10, 2021 at 3:28 pm #1279500Hey Suze,
Thank you for the inquiry.
It seems to be a conflict with the smooth scroll function from the theme. Try to add the no-scroll class name to the button to prevent the page from scrolling when it the button is clicked. The link or button markup should look like this.
<a href="#popmake-117" style="cursor: pointer;" class="avia-button no-scroll avia-color-theme-color avia-icon_select-yes-left-icon avia-size-small avia-position-center pum-trigger"> <span class="avia_button_icon avia_button_icon_left " aria-hidden="true" data-av_icon="" data-av_iconfont="entypo-fontello"></span> <span class="avia_iconbox_title">Click me</span> </a>
Best regards,
IsmaelFebruary 10, 2021 at 11:35 pm #1279620Thanks Ismael – I added the ‘no-scroll’ Custom Class Name to the button which hasn’t changed the scrolling action or the markup.
https://prnt.sc/z0hx0f
Was there some code to add to Quick CSS as well?February 12, 2021 at 2:18 pm #1280036Hi,
Thank you for the update.
The class name should be applied directly to the link tag, but unfortunately, the theme applies it to the div container wrapping the link tag. Please add this script in the functions.php file to add the class name to link tag directly.
//------------------------------ // apply no scroll to button //------------------------------ function ava_apply_no_scroll() { if ( wp_script_is( 'avia-default', 'registered' ) ) { wp_add_inline_script( 'avia-default', ' (function($) { $(document).ready(function() { $(".avia-button-wrap.no-scroll").find("a").addClass("no-scroll"); }); })(jQuery); '); } } add_action( 'wp_enqueue_scripts', 'ava_apply_no_scroll', 9999);
Best regards,
IsmaelFebruary 15, 2021 at 10:48 pm #1280654Hi Ismael,
I tried adding that code to child functions.php and received the following error;Your PHP code changes were rolled back due to an error on line 13 of file wp-content/themes/absolved/functions.php. Please fix and try saving again.
syntax error, unexpected ‘&’
February 16, 2021 at 2:11 pm #1281336Hi,
Thank you for the update.
Did you copy the code from your email? Please try to copy it directly from the forum to make sure that the quotes and any of the symbols in the script are not converted.
Best regards,
IsmaelFebruary 18, 2021 at 2:47 am #1281921No that didn’t seem to work sorry.
I copied the code directly from the forum to functions.phpFebruary 18, 2021 at 3:30 am #1281924Actually – thanks for your help so far, it’s really appreciated – I’ve decided on an alternative workaround though as this is such a simple website.
I added a new page without a menu and an EXIT button that works very similar to the popup.
Thanks again for your time – this support ticket can be closed now.February 19, 2021 at 7:02 am #1282145Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘Popup Maker shortcode not working in Enfold Button’ is closed to new replies.