• Resolved whatwewa

    (@whatwewa)


    Hello sir,
    i am using customizr child theme. How can I place infolink ad code in child theme. They are saying that place ad code before </doby> tag of footer.php. footer.php is not available in child theme. Please let me know where to place infolink ad code in child theme.

    my URL is https://www.whatvwant.com/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can do that in various ways. If you want use templates, just copy customizr/footer.php template in your child theme and then act on int.
    Otherwise you can use one of the large amount of customizr hooks.
    You can add this in your child theme functions.php:

    // Put code after footer, before </body>
    add_action('__after_footer', 'my_elements_after_footer', 100);
    function my_elements_after_footer(){
        $my_html = "SOMETHING"; //Put your html here
        echo $my_html;
    }

    Probably you have to put a script before </body> right?
    So you could use just this:

    // Put code after footer, before </body>
    add_action('__after_footer', 'my_elements_after_footer', 100);
    function my_elements_after_footer(){
    ?>
        <script type="text/javascript">
           //the real script here
        </script>
    <?php
    }

    Hope this helps

    Thread Starter whatwewa

    (@whatwewa)

    Thank you sir, it is working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Infolink ad code’ is closed to new replies.