Viewing 10 replies - 1 through 10 (of 10 total)
  • I can help you out for free, contact me via my site if you want.

    -The Blog Doctor

    Hi,

    You just need to add your adsense code itno header.php file of current active theme. Once you add it your problem will be resolved successfully.

    yes shane right.. edit the header.php and i suggest you to play with other script. to see the difference.

    I have a question for ALL of those who post replies… I noticed in almost all of the replies, the assumption is that the person knows code. Virtually every answer says something to the extinct, ” just need to add your adsense code itno header.php file of current active theme.”

    Ok, we got that! But WHERE in the Header.php file do we add the code? You could cut down on the repetitive questions by answering the question so that a person with the same issue, like me can read the resolution without asking the same question again.

    I have the same question as, “xpid” for this Blog: https://findgenerators.net/Blog/

    However, just saying post in the Header.php does not help because it has to be placed in the right location.

    It depends on “where” in the header of your page you want the ad to appear. It is pretty easy to do like many of us have and try out a couple of places to see what works. That way you actual learn something (about code).

    Ok, kmessinger, thanks for the response. So here is my header.php file. where would I place the code?

    I want it centered in the info bar right below the header.

    Thanks in advance for your input and help,

    JE

    <?php include (TEMPLATEPATH . “/pagefunctions.php”); ?>
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
    <html xmlns=”https://www.w3.org/1999/xhtml”&gt;
    <head profile=”https://gmpg.org/xfn/11″&gt;
    <meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’); ?>” />
    <meta name=”distribution” content=”global” />
    <meta name=”robots” content=”follow, all” />
    <meta name=”language” content=”en” />
    <title>

    <?php if (is_home() ) {?><?php bloginfo(‘description’);?> | <?php bloginfo(‘name’); }
    elseif ( is_single() ) { ?><?php wp_title(”); ?> | <?php $cat = get_the_category(); $cat = $cat[0]; echo $cat->cat_name; ?> | <?php bloginfo(‘description’); }
    elseif ( is_page() ) { ?><?php wp_title(”); ?> | <?php bloginfo(‘description’); }
    elseif ( is_category() ) { ?><?php single_cat_title(”);?> | <?php bloginfo(‘description’); }
    elseif ( is_archive() ) { ?><?php wp_title(”); ?> | <?php bloginfo(‘description’); }
    elseif ( is_search() ) { ?><?php echo $s; ?> | <?php bloginfo(‘description’); }
    elseif (is_tag()) {$tagTitle = preg_replace(‘/-/’ , ‘ ‘ , $tag); echo ucwords($tagTitle); ?> | <?php $cat = get_the_category(); $cat = $cat[0]; echo $cat->cat_name; ?> | <?php bloginfo(‘description’); }
    else { ?><?php wp_title(”); ?> | <?php bloginfo(‘description’); }?>
    </title>
    <meta name=”distribution” content=”global” />
    <meta name=”robots” content=”follow, all” />
    <meta name=”language” content=”en” />
    <meta name=”generator” content=”WordPress <?php bloginfo(‘version’); ?>” />
    <link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<?php bloginfo(‘rss2_url’); ?>” />
    <link rel=”alternate” type=”text/xml” title=”RSS .92″ href=”<?php bloginfo(‘rss_url’); ?>” />
    <link rel=”alternate” type=”application/atom+xml” title=”Atom 0.3″ href=”<?php bloginfo(‘atom_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo(‘pingback_url’); ?>” />
    <?php wp_get_archives(‘type=monthly&format=link’); ?>
    <?php //comments_popup_script(); // off by default ?>
    <?php if (is_single() and (‘open’ == $post-> comment_status) or (‘comment’ == $post-> comment_type) ) { ?>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/prototype.js.php”></script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/effects.js.php”></script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/ajax_comments.js”></script>
    <?php } ?>
    <?php if (is_page() and (‘open’ == $post-> comment_status)) { ?>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/prototype.js.php”></script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/effects.js.php”></script>
    <script type=”text/javascript” src=”<?php bloginfo(‘template_directory’); ?>/js/ajax_comments.js”></script>
    <?php } ?>
    <style type=”text/css” media=”screen”>
    <!– @import url( <?php bloginfo(‘stylesheet_url’); ?> ); –>
    </style>
    <?php wp_head(); ?>
    </head>

    <body>
    <script type=’text/javascript’ src=’https://track3.mybloglog.com/js/jsserv.php?mblID=&lt;?php include (TEMPLATEPATH . ‘/id-mybloglog.php’); ?>’></script>
    <div id=”wrap”>
    <div id=”header”>
    <div id=”logo” onclick=”location.href=’https://www.xxxxgenerators.net/Blog&#8217;;” style=”cursor: pointer;”>

    <!– If you want the blog title to appear automatically, delete this entire line
    <div id=”blogname”>
    <h1>/”><?php bloginfo(‘name’); ?></h1>
    <h3><?php bloginfo(‘description’); ?></h3>
    </div>

    If you want the blog title to appear automatically, delete this entire line –>

    </div>
    </div>
    <div class=”navigation”>

    • /”>Home
    • <?php include (TEMPLATEPATH . ‘/navigation.php’); ?>

    </div>

    Sorry, no time to look at code . . . what I suggested was

    It is pretty easy to do like many of us have and try out a couple of places to see what works.

    what happened to this post? is it resolved?

    echo ‘
    <table cellspacing=”0″ cellpadding=”3″ border=”0″ align=”left” width=”95%” class=”tborder”>
    <tr>
    <td align=”center”>

    ur adsense code here

    </td>
    </tr>
    </table>’;

    put the above code anywhere on ur header.php. make sure u put it before the ?> tag

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to add AdSense on header’ is closed to new replies.