Jump to content
Sign in to follow this  
bryanhaines

Place Banner Ad Next to Logo in Header

Recommended Posts

bryanhaines

I'm trying to place a banner ad (jpg format - no javascript - around 468 x 60) on the upper right banner/header area - to the right of the blog logo. I've tried a number of ad management plugins and I've tried hooks - but I can't figure it out. It should be so simple, but I'm a little lost. Can you give me some direction?

Share this post


Link to post
Share on other sites
Rob

When you place an ad right of the branding, you have to adjust to the correct hook and complement that with CSS to make sure the alignment is correct. For example, from my site:

// HOOKS EXAMPLE --------//
		// Below is an example of how you would add a social media icon to the icons in header (branding section)
		// We have placed a hook at the end of the icon set specifically add new icons without modifying code or having to worry about your edits
		// getting thrown out during the upgrade process. The way to use hooks goes a little like this:
	
		// add_action('hook_name','function name');
	
	// ---> uncomment to load
	add_action('pagelines_inside_top_branding', 'google_leaderboard_ad');
	
	// function name
	function google_leaderboard_ad(){
	// This hook adds a stumbleupon icon to the header of your theme. The class referenced in the link can be seen in the style.css
	// and is the image from the CSS is placed in the images folder
	?>
	
<?php } // end function[/code] Coordinates with this CSS:
[code]div.leaderboard {float: right;}

Without the CSS, the ad drops to the bottom of the branding area and flushes left. While your ad placement may or may not be a Google code, the basic premise is the same. Where I have


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
bryanhaines

Thanks Rangelone - I'll give it a try!

Share this post


Link to post
Share on other sites
Rob

Let us know how it goes!


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
indakno

Can I add a question to this same subject? How do you make it where the ad links to the add and not back to the website. Check it out: www.indakno.com

Share this post


Link to post
Share on other sites
batman

Hi indakno You can try with

#branding .branding_wrap {
	    position: absolute;}


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×