1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Need help with simple code.

Discussion in 'PHP & Perl' started by cyanide, Jul 4, 2010.

  1. cyanide

    cyanide Junior Member

    Joined:
    May 9, 2010
    Messages:
    136
    Likes Received:
    160
    I know how to place a banner at the bottom of the Wordpress blog home page using this:
    Code:
    <?php if(is_home() && $post==$posts[0] && !is_paged()) { ?>
         AD HERE.
    <?php } ?>
    ..but I'd like a banner to be at the top too. Could somebody give me a code or modify that one to put the ad at the top?

    Thanks in advance.
     
  2. zone69

    zone69 Junior Member

    Joined:
    Nov 24, 2008
    Messages:
    196
    Likes Received:
    1,290
    I think this WP plugin can do what you need:
    Code:
    http://wordpress.org/extend/plugins/wp-frontpagebanner/
    
    I personally haven't tried it yet but had downloaded it to try it out. Just haven't gotten around to it yet.

    Hope this works for you!
     
    • Thanks Thanks x 1
  3. Bots_Do_it_Faster

    Bots_Do_it_Faster Registered Member

    Joined:
    Jun 28, 2010
    Messages:
    64
    Likes Received:
    77
    Occupation:
    Web Developer php and c#
    Location:
    South Florida
    If you want your banner to show in or just below the header you will need to edit your header.php theme file. You should be able to find this file located:

    /<Your Web Root>/wp-content/themes/<Your Theme>/header.php

    You will need to ftp into your webserver and locate and open the above file. Once inside simply copy and past the banner code at the very bottom to have it appear below your header. Depending on your design you may need to add some css to adjust the position of your banner. Hope this gets you pointed in the right direction.
     
    • Thanks Thanks x 1