How to organize the work of the Builder Popup plugin for WordPress in php (HTML) that would popunder load on click?

Hello friends, there is a site on WordPress it is necessary to organize a screening form (plugin Formidable) in the popunder via button-click. As the plugin which created the form needs to restart pages were found, the plugin pop-up ads Popup Builderwhich gives the response window after the form is submitted.
In General, I must add header.php themes for WordPress link which will show the form I did:
<?php echo do_shortcode being( '[sg_popup id="1" event="click"]
 <div style="" id="c4s_widget_button_53e60ebb407324d54332dd7de2257047" class="c4s-widget-btn"-->
<button id="votcallback_btn_open" class="c4s-modal-btn" onclick>
<span class="c4s-turnInf-span">
</span>
<span class="c4s-txtRu-span">
</span>
</button>
<div class="c4s-circle-flat">
</div>
<div class="c4s-left prompt-prompt ">
<span>
Request a call back</span>
<span>
* Free service links</span>
</div>


[/sg_popup]')
 ?>


But without inserting in Functio.php this code:
showPopupInChildTheme function() {
 but this do_shortcode echo('[sg_popup id="1" event="click"][/sg_popup]');
}


Code buttons not working. In General everything is fine only the problem is that now the popunder is displayed on page load and on every page of the website, and must be shown on each page but by clicking on the button - how to fix it?
July 8th 19 at 12:25
1 answer
July 8th 19 at 12:27
if( is_front_page() ) {
but this do_shortcode echo( '[sg_popup id="1" event="click"]
 <div style id="c4s_widget_button_53e60ebb407324d54332dd7de2257047" class="c4s-widget-btn">
<button id="votcallback_btn_open" class="c4s-modal-btn" onclick>
<span class="c4s-turnInf-span">
</span>
<span class="c4s-txtRu-span">
</span>
</button>
<div class="c4s-circle-flat">
</div>
<div class="c4s-left prompt-prompt ">
<span>
Request a call back</span>
<span>
* Free service links</span>
</div>

</div>
[/sg_popup]')
}
Greetings, thanks for the reply.
First I sealed in function.php another code:

showPopupInChildTheme function() {
but this do_shortcode echo('[sg_popup id="1" event="click"][/sg_popup]');
}

The second pasting Your code, not what has changed, popunder still POPs up on all pages.

But still thank you. - Hertha17 commented on July 8th 19 at 12:30
And it is necessary that the button is present on all pages not just the home.
All responded many thanks - Hertha17 commented on July 8th 19 at 12:33
Button leave also header.php
And the popunder to transfer the file index.php (template of the main page) and it will float accordingly, only the main - carleton commented on July 8th 19 at 12:36
Hi, no it does not. Need to alter:
showPopupInChildTheme function() {
but this do_shortcode echo('[sg_popup id="1" event="click"][/sg_popup]');
}

So what would the popunder was not displayed when loading each page, but is displayed when you click the button. Something like that. - Hertha17 commented on July 8th 19 at 12:39
That is, when you click on the button (because the button is written in the header) popunder should appear on any page of the website. - Hertha17 commented on July 8th 19 at 12:42
Noticed another point, if I insert the short code into the body of the entry or page (in the visual editor of the text). This page or record button works correctly. Means the button tightens his scripts and classes that pulls correctly inserted short code. - Hertha17 commented on July 8th 19 at 12:45

Find more questions by tags WordPress