Tagged: 

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

    Hi guys!!!

    I want to make sure I am not messing anything up. I am setting up Google DFP and there’s javascript they provide to add between <head> and </head> (I added it below)

    This is from the Google site:
    Document header
    <!DOCTYPE HTML>
    <html lang=”en-us”>
    <head>
    <meta http-equiv=”Content-type” content=”text/html; charset=utf-8″>
    <title>Widgets Magazine</title>
    <style type=”text/css” media=”screen”>
    </style>
    HERE GOES THE SCRIPT
    </head>

    Should I add it to header.php right after this piece of the code? Or somewhere else?

    <!DOCTYPE html>
    <html <?php language_attributes(); ?> class=”<?php echo ” html_{$style} “.$responsive.” “.$preloader.” “.$av_lightbox.” “.avia_header_class_string();?> “>
    <head>
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />

    <!– page title, displayed in your browser bar –>
    <title><?php if(function_exists(‘avia_set_title_tag’)) { echo avia_set_title_tag(); } ?></title>

    Thank you so much!!!! :)
    Warmly,
    Havi

    #591879

    Hi havi,

    Try adding the following to your functions.php file:

    function google_dfp(){ ?>
    your code goes here
    <?php
    }
    add_action('wp_head', 'google_dfp');

    Regards,
    Rikard

    #598026

    Will try, Rikard!!! :)

    I’ll keep you posted! (so far I think DFP is not quite linking to my Adsense)

    Warmly,

    Havi

    #598039

    Hey!

    We will keep the thread open and wait to hear from you :)

    Best regards,
    Yigit

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