- This topic has 9 replies, 3 voices, and was last updated 5 years, 2 months ago by David.
-
AuthorPosts
-
February 20, 2019 at 11:17 am #815880Adam
Hey Tom and Team,
I successfully added a modal popup contact form when someone clicks ‘CONTACT’ on our nav menu from the homepage. In order to make it work across the entire site, the author of the modal popup widget (Ultimate Addons Elementor) instructs me to put the following code in the theme/child theme functions.php file:
function ultimate_elementor_modal_popup() { echo do_shortcode( '[uael-template id="your-saved-section-id"]' ); } add_action('wp_footer', 'ultimate_elementor_modal_popup');
I’ve tried to add it as a Hook to wp_footer (and wp_header) for the Entire Site but no success. I know I probably haven’t adapted the code to work as a GP Hook, but I don’t know any Javascript. Appreciate your guidance.
Adam
February 20, 2019 at 11:30 am #815888epickenyanUse the code snippets plugin instead https://wordpress.org/plugins/code-snippets/
February 20, 2019 at 12:02 pm #815912AdamI thought the hooks in GP’s Elements feature were suppose to replace code snippets. Either way, when I paste that code into a new code snippet using that plugin, still doesn’t work.
February 20, 2019 at 1:07 pm #815955DavidStaffCustomer SupportHi there,
you shouldn’t need that snippet.
Instead create a new Element Hook, select the WP_footer hook and add this part of your code only:echo do_shortcode( '[uael-template id="your-saved-section-id"]' );
Check the execute PHP and Shortcode boxes and set your display rules.
Of course make sure to add your your-saved-section-id in the shortcode.February 20, 2019 at 1:33 pm #815970AdamHey David, thanks for the reply. Followed your instructions but no luck. Purged cache and tried in incognito browsers in both Firefox and Chrome. Loads on homepage and no where else. I’ve had luck with a few other simple hooks, but this one continues to evade me. If you have any other suggestions please pass along. I’m also starting a ticket with the Ultimate Addons for Elementor people.
Cheers,
AdamFebruary 20, 2019 at 2:26 pm #815998DavidStaffCustomer SupportWhat if you just add the shortcode e.g:
[uael-template id="your-saved-section-id"]
Can you check your Display rules in the hook as well? Is it set to the Entire Site?
February 20, 2019 at 2:47 pm #816008AdamYep set to Entire Site. Both the code you recommended before and this new code just make the form show up below the footer on each page, but not upon clicking the nav menu item.
February 20, 2019 at 2:54 pm #816010DavidStaffCustomer Supporti am not sure how that plugin works. Does it have any conditional display rules? If not then you may need to check with the plugin author
February 20, 2019 at 3:01 pm #816016AdamOk David, well I really appreciate you trying. I’ll see if they can help me. Cheers!
Adam
February 20, 2019 at 4:13 pm #816044DavidStaffCustomer SupportYou’re welcome. Let us know how you get on or if the problem still exists and we can take another look.
-
AuthorPosts
- You must be logged in to reply to this topic.