WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Ad on Home Page (3 posts)

  1. AA
    Member
    Posted 5 years ago #

    Hi,

    I need to put an ad on the Home,Search,Tag & Archive pages but not on individual post pages. I only need the ad to appear once above the first post in the article/post area. So, in my infinite CSS wisdom ;) I inserted the code in the Main Index area of the theme just above <div class="main"> code. This did actually show the ad on the home page but with no padding between the ad & the top of the 1st post.

    So, how do I ad padding & did I put the code in the correct area of the theme?

    Thanks, Alan

  2. particlepat
    Member
    Posted 5 years ago #

    I would place the ad inside another div so that you can better control where it will be placed.

    example

    <div id="wrapper">
    
         <div id="main">
         </div
    
         <div id="ads">
         </div>
    
    </div

    The reason I placed the ads div underneath the main div so the when an SEO Google bot goes through your site, it reads through your code. So I put it after the main content so the search engine will index your content rather than straying off to the website your ad links to. Now all you have to do is place the div using CSS.

  3. AA
    Member
    Posted 5 years ago #

    Thanks... but I am a bit confused :) Does this code go in the main index.php & where exactly? Is the code you indicated inclusive of some code that already exists in my template or do i need to create all such code? And...where in the div code do I put the ad code?

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags