editing head tag (2 posts)

  1. brilliantvideos
    Posted 6 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    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;?>

Topic Closed

This topic has been closed to new replies.

About this Topic