Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #654717

    Hi,

    for a “Thank you” page of my website I need a facebook tracking code in one single page of my website, f.e. http://domain.de/contact/thank-you.
    If I put the code into a Code Block element, the tracking code is in <body> of the page. But I need the code in <head>. How can I do that with Enfold (I changed from Thesis to Enfold)?

    #654790

    Hi Marcel!

    Please add following code to Functions.php file of your child theme in Appearance > Editor

    function add_custom_code(){
    if(is_page(59)) {
    ?>
    // YOUR CODE GOES HERE 
    <?php
    }
    }
    add_action('wp_head', 'add_custom_code');

    You would need to change 59 to the ID of your page

    Best regards,
    Yigit

    #654821

    Hi Yigit,

    thank you very much. It works fine.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘How to get code into the of a page with Code Block?’ is closed to new replies.