Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #723900

    Hi, how can I add tracking codes inside the body tags and not in the header?

    Also, how can I add code to a specific page?

    Thanks.

    #723912

    Hi DROR!

    Here is the body function at the API
    https://codex.wordpress.org/Plugin_API/Filter_Reference/body_class

    you can also use the is_page to track it and make it work only on one page.

    Thanks a lot

    Regards,
    Basilis

    #723918

    Hi Basillis, not sure what I should do with the function at the API… Any chance you can be more specific?

    #724903

    Hi,

    Please add following code to Functions.php file in Appearance > Editor

    function avia_custom_page_code(){
    if(is_page(59)){
    ?>
    // Your code goes here 
    <?php
    }}
    add_action('wp_footer', 'avia_custom_page_code');

    This would load the code on page with ID 59

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.