Please Read First
Troubleshooting Tips
Frequently Asked Questions
Before Posting Please Disable Wp Super Cache Plugin
When Posting Please Include Your URL.
Search Forum Using Google Search Box Above
Forum Video

Results 1 to 10 of 10
  1. #1
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Question can't place adsense link unit in the header menu

    I'm editing the header and trying to insert 468x15 link unit on the right of the header menu

    here is where i place the code:

    <!-- Main Nav -->
    <?php if (!$primaryNav['display']) { ?>
    <div class="im-nav"><a href="<?php bloginfo('url') ?>/wp-admin/admin.php?page=functions.php">Please configure in Socrates Admin Panel</a></div><!-- /close im-nav -->
    <?php } else if ($primaryNav['display'] == 'block' ){ ?>
    <div class="im-nav">
    <?php
    socrates_generate_nav_links($primaryNav, '');
    ?>

    ADSENSE CODE HERE

    </div> <!-- /close im-nav -->


    i tried just the code, wrapping it in a div, with top:10px or other paddings, float left and right, can't make it properly! Well i'm not a CSS expert either.

    I just want it on the right of the menu centered from the top and bottom at the same level as the menu links. Can someone help me?

  2. #2
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,214
    Rep Power
    12

    Default

    Please share link.

  3. #3
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Default

    just sent you a PM, thank you!

  4. #4
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,214
    Rep Power
    12

    Default

    Just sent fix.. but want to mention that I never even thought to do this, but it's a no brainer to populate the primary navbar.

    Appearance > Editor > header.php

    Look for this and add the bolded text...

    <div class="im-nav">
    <?php
    socrates_generate_nav_links($primaryNav, '');
    ?>
    Adsense Link Unit </div>
    Just be aware if you have a few nav links there it could cause a problem with search bar.. if so, you can remove the search bar and use search widget

  5. #5
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Default

    that's exactly where i'm placing it, as pasted in the first post

    the thing is it either overlaps the menu or goes below.....

  6. #6
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,214
    Rep Power
    12

    Default

    okay... I assumed it would work like on the left but it did not..

    Try this..

    Add

    .linkunit {margin: -3px 0px 2px 100px;}

    To bottom of style.css

    then in header user

    <div class="linkunit">Ad unit code </div>

    Adjust 100px for distance from links.

  7. #7
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Default

    it worked out perfectly, thank you so much!

  8. #8
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Default

    actually now i found that it goes 100px from the left side, i would like it to go 100px from the last link, that way i wont have to set it manually for every site and reset it after adding a page

  9. #9
    Join Date
    Jun 2010
    Location
    Maine
    Posts
    7,214
    Rep Power
    12

    Default

    Increase the 100px until you think it works the way you want it to.

  10. #10
    Join Date
    Sep 2010
    Posts
    29
    Rep Power
    0

    Default

    as i said that's not good, cause needs to be reset for every site, and after every new page.
    anyway, i found another way, thank you....

Similar Threads

  1. How to make the header link back to the home page?
    By chrischiang in forum Graphics and Design
    Replies: 3
    Last Post: 09-03-2010, 10:18 AM
  2. Link under header
    By propertyman in forum Official Support
    Replies: 5
    Last Post: 07-09-2010, 04:40 AM
  3. Remove adlink in Custom Display Unit
    By The Exposure Strategist™ in forum Official Support
    Replies: 1
    Last Post: 07-05-2010, 08:45 PM
  4. Second menu bar link not taking me to the page
    By beards in forum Official Support
    Replies: 2
    Last Post: 07-04-2010, 08:58 PM
  5. Replies: 2
    Last Post: 06-17-2010, 12:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •