WordPress.org

Forums

How do I put adsense between nav bar and page title (10 posts)

  1. hotrocks
    Member
    Posted 2 years ago #

    I want to put an ad link unit just above the page/post title, below the blue nav bar.
    I'd like it to show up here on every page.

    I've tried a couple ad placement plugins but none seem to have the option to put it in this location.

    I'll have to put it directly into the .php but I'm not sure where.

    Any suggestions?

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    link to your site?

  3. hotrocks
    Member
    Posted 2 years ago #

  4. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    (the following suggestion is made without knowing any particular features of your theme. it is based on the general structure of 'simple' themes.)

    try to locate this code (either in header.php, or index.php, or ?)

    <!-- main page block -->
      <div id="main" class="block-content">
       <div class="mask-main rightdiv">
        <div class="mask-left">

    add your adsense after the second line:

    <!-- main page block -->
      <div id="main" class="block-content">
    <div class="adsense-top">ADSENSE</div>
       <div class="mask-main rightdiv">
        <div class="mask-left">

    the example above uses a div with a css class .adsense-top which you could use to add extra formatting

  5. hotrocks
    Member
    Posted 2 years ago #

    thanks alchymyth

    found the code in the index.php and added as you suggested but didn't seem work. the ad isn't showing up anywhere.

    any other suggestions?

    BTW, i'm using arclite theme

  6. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    are you sure you have edited the right file, and saved it properly?

    there is no adsense code in the html code in the browser.

  7. hotrocks
    Member
    Posted 2 years ago #

    i just noticed that too.

    i added it to the index.php and have for sure saved it correctly. i added the code through the wp admim then to make sure, i went and looked at it through ftp and it was there, so it's definitely saved in the index.php.

    i have looked in other files and can't find that code anywhere else, only in the index.php.

    is there somewhere else i also need to add it to?

  8. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    try page.php

    in your setup, you might have a static front page.

  9. hotrocks
    Member
    Posted 2 years ago #

    bam! that worked!!
    thanks so much alchymyth. very much appreciated.

    now, one last question... i'd like to remove the blue nav bar. any idea on how to go about this?

  10. hotrocks
    Member
    Posted 2 years ago #

    never mind, i've figured out how to remove the nav bar.

    thanks again for your help alchymyth

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.