Community Forums › Forums › Design Tips and Tricks › Adding a Banner Ad below the Nav Bar
Tagged: banner below nav, landscape child theme, WP Cycle
This topic contains 9 replies, has 4 voices, and was last updated by YippyMomma 3 months, 3 weeks ago.
-
AuthorPosts
-
January 5, 2013 at 11:23 am #9752
I’m using Landscape theme.
I need to add a banner ad to the home page below the primary nav BUT above the WP-Cycle.
Can someone advise on how to do this? thanks.
January 5, 2013 at 11:29 am #9754Just edit your home.php file to add your banner code. Open your home.php file in a text editor (NOT Microsoft Word!) and look for this code:
<div id="homepage"> <?php if( function_exists('wp_cycle') ) : ?> <?php wp_cycle(); ?> <?php endif; ?> </div>Change it to this
<div id="homepage"> <div class="home-banner"> [BANNER HTML CODE GOES HERE] </div> <?php if( function_exists('wp_cycle') ) : ?> <?php wp_cycle(); ?> <?php endif; ?> </div>Replace the [BANNER HTML CODE GOES HERE] with the HTML code for your banner.
Then add any css styling you might need to your style.css file to make the .home-banner area look the way you want it to.
January 8, 2013 at 6:05 am #10328This worked!
Is it possible to place the banner above (outside) of the wp-cycle frame?
Thank you for your help!
January 10, 2013 at 3:10 pm #11041Trying just to see if anyone knows if it’s possible to place the banner above (outside) of the wp-cycle frame?
January 10, 2013 at 8:59 pm #11120You could try adding the following to your theme’s function.php
add_action( 'genesis_before_content_sidebar_wrap', 'child_before_content_sidebar_wrap' ); function child_before_content_sidebar_wrap() { ?>INSERT AD CODE HERE<?php }
January 10, 2013 at 9:21 pm #11128So remove the home.php code I added then try the function.php code?
January 11, 2013 at 8:16 am #11202January 11, 2013 at 10:58 am #11257Hi John,
I tried your solution and it places the banner inside the inner tag on all pages except the home page. The code needs to be placed after the <div id=nav> and before <div id=inner>
Suggestions anyone?
January 13, 2013 at 12:31 am #11546Just following up on this to see if anyone else has a thought? Thanks!
January 24, 2013 at 9:18 pm #14529My client decided to just leave the banner in the wp-cycle area since it’s displaying properly.
-
AuthorPosts
The topic ‘Adding a Banner Ad below the Nav Bar’ is closed to new replies.