WordPress.org

Ready to get started?Download WordPress

Forums

my ad in the sidebar drops to the footer (7 posts)

  1. thetattooedmama
    Member
    Posted 6 years ago #

    When placing my ad in the sidebar, at certain times it will drop to the footer of my blog. Am I missing something?
    tthe code i place in the stylesheet:

    #ads {
    background:#fff;
    text-align: justify;
    padding-left: 10px;
    padding-right: 10px;
    }

    and i paste this to the index.php file, single.php file and page.php file just before the call for the leftmenu.php:

    <div class="ads">
    <p style="text-align:center">ad script here </p>
    </div>

    for some ads, it works fine, but for others, it drops to the footer.

  2. thetattooedmama
    Member
    Posted 6 years ago #

    anybody?

  3. viceng
    Member
    Posted 6 years ago #

    your code should probably be placed in the sidebar leftmenu.php...not index.php

  4. thetattooedmama
    Member
    Posted 6 years ago #

    Does it matter that I have two sidebars? sidebar.php and leftmenu.php

  5. viceng
    Member
    Posted 6 years ago #

    it doesn't matter...where do you want the ad to be?

  6. thetattooedmama
    Member
    Posted 6 years ago #

    i want the ad to be above both of the sidebars, like on this site makingitlovelyDOTcom

  7. viceng
    Member
    Posted 6 years ago #

    Okay, that's a different question.

    What you want is to create a container for your ad and your sidebars. So after the loop you should see a /div to close the posting container. After that, you probably see calls to your leftmenu and sidebar. Before the calls, do a div with your ad content, make your calls to the leftmenu and sidebar, then close the container with a /div. your sidebars will be inside the container and probably contain their own div's. You would control the width of the container and the sidebars using your css file.

Topic Closed

This topic has been closed to new replies.

About this Topic