WordPress.org

Support

Support » How-To and Troubleshooting » editing head tag

editing head tag

  • I need to define a landing page and only in that page I need to copy a tracking code somewhere between <head> and </head>. How can I realize this? How can I find and edit in that area (for a single page; to not apply for the entire website)? Thank you!

Viewing 1 replies (of 1 total)
  • esmi

    @esmi

    Forum Moderator

    Edit header.php and add:

    <?php if(is_single('Post_Title_Goes_Heree')) :?>
    [ insert tracking code ]
    <?php endif;?>

    if you want to add the code to a single, named, post page. If you want to add it to a single, named, WordPress Page, use:

    <?php if(is_page('Page_Title_Goes_Here')) :?>
    [ insert tracking code ]
    <?php endif;?>
Viewing 1 replies (of 1 total)
  • The topic ‘editing head tag’ is closed to new replies.
Skip to toolbar