Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Popup Builder Team

    (@popup-by-sygnoos)

    Dear @shaaruddin,

    To insert the popup on your main page, go to your theme’s index.php (main file). Insert the following code there: <?php echo do_shortcode(‘[sg_popup id=”1″][/sg_popup]’); ?>
    This way you’ll have an on load kind of popup.
    We can offer you another thing. In our Pro version you can select the homepage from the options and your popup will open on load without any codes typing.

    Best regards,
    Sygnoos Team.

    Thread Starter shaaruddin

    (@shaaruddin)

    Wow, Thank you very much.

    I just pasted that code and now I am locked out of my site.

    Parse error: syntax error, unexpected ‘<‘ in /home/ktrides22/public_html/modernmotomag.com/wp-content/themes/tracks-child/functions.php on line 31

    Dear @ktrides2,
    Are you sure you have inserted code in a correct place (‘wp-content/themes/tracks-child/index.php’)?
    Also, check if you don’t miss anything like ;, <, > and so on.
    Anyway if you have FTP credentials to your Website you can revert changes.

    Feel free if you need any further assistance!

    Best Regards,
    Sygnoos Team.

    @sygnoos,
    Well that was all me – I accidentally pasted it into functions.php instead of index.php.
    This is my first time working a child theme and I don’t have an index.php file for it. Do I just create a blank one and this line of code would be the only thing in it for now or do I copy the entire main theme’s index file to my child and then add this?
    Sorry this is veering away from the plugin question. This is the 3rd pop-up plugin I have tried this week, I really want to make it work, it is the most user friendly so far, even with the extra step for the home page.

    Thread Starter shaaruddin

    (@shaaruddin)

    Hi @ktrides2

    I think you have to go your functions.php and look for this code <?php echo do_shortcode(‘[sg_popup id=”1″][/sg_popup]’); ?>. Then remove that line of code and everything is fine if its just the problem.

    Plugin Contributor Popup Builder Team

    (@popup-by-sygnoos)

    Dear @ktrides2,

    Please, let us know if your issue is solved.

    Best regards,
    Sygnoos Team.

    It is not resolved, I still don’t know where to paste the code if I do not have an index.php file in my child theme.

    Thank you @shaaruddin, I already removed that from functions and am back in my site, the problem is as stated above.

    Thank you.

    Plugin Contributor Popup Builder Team

    (@popup-by-sygnoos)

    Dear @ktrides2,

    Could you, please, tell us the name of the theme you’re using so we can check what causes the issue.( wp-popup@sygnoos.com)
    Also it would be helpful if you send us the files names under the child theme directory, so we can help you out.

    Best regards,
    Sygnoos Team.

    Theme is called Tracks. Style.css and functions.php are the only files in my child theme right now.

    Thanks so much Sygnoos.

    Plugin Contributor Popup Builder Team

    (@popup-by-sygnoos)

    Dear

    Your function’s php probably is an empty file, so, please, insert this code into your function’s php. (The id in the code is your popup’s id, write the id of your popup e.g. id=”1″)

    add_action('wp_head','showPopupInChildTheme');
    
    function showPopupInChildTheme() {
         echo do_shortcode('[sg_popup id="1"][/sg_popup]');
    }

    Please, try so and let us know when you succeed.

    Best regards,
    Sygnoos Team.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Insert plugin code into frontpage.php in theme editor’ is closed to new replies.