Add Popup Content After opens
-
Hello.
Is there a possibility to add a content of popup after opening <body> tag?
Thanks in advance!
-
@extrim25 – Can you elaborate on what you are trying to do? The popups themselves are shown in the footer before the </body> tag. A bit more info will help find the best solution. Anything is possible with Popup Maker.
@danieliser I want to show it right before opening of body in header (not before closing </body> in the footer).
@extrim25 – This won’t make any difference as the popups are positioned absolutely. Moving it to the opening body tag will literally make 0 difference in its appearance. Are there any particular reasons? You could do this with shortcodes but not with the main popups created using the popup editor.
@danieliser – I need this not for appearance. Its for SEO. What shortcode or php code i need to insert?
@extrim25 – So your trying to get the popups content above your page content? Your call, but just from an SEO perspective ( Been providing SEO for clients for over 7 years ), a popup is generally not where you want your SEO related content.
Shortcodes won’t work if your using auto open or anything other than click open or using your own JS to trigger it.
I’m imagining some edge case where your putting your headline into the popup for some reason, but the shortcode looks like this assuming your doing it in your template files.
<?php echo do_shortcode( '[popup id="header" size="medium" title="My Popup"]Content goes here[/popup]' ); ?>This will result in a popup with id of popmake-header, so you could then use JS to trigger it with
jQuery(document).ready(function () { jQuery('#popmake-header').popmake('open'); })Hope this helps.
@danieliser – I cant insert enough text in page, so i decided to popup it. Is there a solution, to edit something in plugin files, to make it insert after <body> automatically?
@extrim25 – in that case your content is likely different on every page correct?
In which case use the [popup] shortcode in your content editor when and where needed only.
It will create the popup in the same position you use the shortcode it.
So something like.
Some content <h2>A heading</h2> Some more content [popup id="more-content"]Some offscreen hidden content[/popup] [popup_trigger id="more-content]Show me the hidden content[/popup_trigger] <h2>Another heading</h2> Some additional content.@danieliser – Yes, at every page it must be different and formatted.
I want to insert entire text (with h1, h2, li etc.) with images to popup (via button).Trying your example – not working.
In code:
<div id='popmake-722' class='popmake theme-1 responsive size-small' data-popmake='{"id":"722","theme":1,"meta":{"display":{"size":"small","overlay_disabled":0,"custom_width":"","custom_width_unit":"px","custom_height":"","custom_height_unit":"px","custom_height_auto":1,"location":"center top","position_top":100,"position_left":0,"position_bottom":0,"position_right":0,"position_fixed":0,"animation_type":"slide","animation_speed":350,"animation_origin":"top"},"close":{"overlay_click":0,"esc_press":1}}}'><div class="popmake-content"></div><a class="popmake-close">×</a></div>Can you paste the code you used to create that? That is what is output by the shortcode but it doesn’t appear that you added in any content.
Also don’t use a number id in your inline popups. This will prevent any possible issues with popups created using the editor as those will use #’s.
The example I gave should have resulted in a div with id=”popmake-more-content” not popmake-722.
The [popup] and [popup_trigger] both need to have a matching id. The trigger will become a clickable text to trigger the inline popup to open. If you want a button then your popup trigger shortcode should look like this.
[popup_trigger id="more-content" tag="button" class=""]Button Text[/popup_trigger]Thank you a lot. Problem resolved.
@extrim25 – awesome. Glad to hear you got it working.
Please take a moment to rate and review the plugin and or support.
The topic ‘Add Popup Content After opens’ is closed to new replies.