Jump to content
Sign in to follow this  
avidcruiser

Custom Banner Ad Using Child Theme in Platform Pro

Recommended Posts

avidcruiser

I need to replace the custom header for my site, www.avidcruiser.com, with an ad. I was able to to this using White House Pro, by adding the html to header.php. However, I switched to Platform Pro today, and my understanding is that custom elements are best done in the child theme. The html I need to add follows. Could someone show me what this would look like, with hooks and all defined in functions.php? Thank you, Ralph

	<!--// 728x90 Leaderboard Container Start -->
				<div id="topAd" style="width: 728px; height:90px; margin: 5px auto;"><!--JavaScript Tag // Tag for network 5111: Gannett // Website: USAT-TravelAlliance-AvidCruiser // Page: TravelAlliance-AvidCruiser // Placement: TATop728x90 (1649175) // created at: Nov 9, 2010 7:54:54 AM-->
				<script language="javascript"><!--
				document.write('<scr'+'ipt language="javascript1.1" src="http://adserver.adtechus.com/addyn/3.0/5111/1649175/0/225/ADTECH;loc=100;target=_blank;key=key1+key2+key3+key4;grp=[group];misc='+new Date().getTime()+'"></scri'+'pt>');
				//-->
				</script><noscript></noscript>
				<!-- End of JavaScript Tag -->
				</div>
				<!--// 728x90 Leaderboard Container End -->[/code]

Share this post


Link to post
Share on other sites
catrina

This tutorial offers help on how to implement a hook: http://www.pagelines.com/docs/base-child-theme To get started, you need to determine which hook you need to use, which you can find in Template Setup > Site Header (from the Select Template Area dropdown menu) > Site Branding > Advanced Setup. You will see a list of hooks. The hook that you probably need would be pagelines_inside_top_branding (which just means "inside branding area"). This determines where your leaderboard will be placed. Does that make sense?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
avidcruiser

Thank you Catrina. It does help, and I had chosen that hook, but the tutorial doesn't show how to embed the html in a detailed manner. For example, what function name do I specify? And do I simply insert the html inside the php tags? ?> <?php } Thanks for your help. Ralph

Share this post


Link to post
Share on other sites
kastelic
// add_action('hook_name','function name');
	add_action('pagelines_branding_icons_end', 'YOURFUNCTIONNAME');
	
	// function name
	function YOURFUNCTIONNAME(){
	echo "<div class='bg-image'></div>";
	?>

I have modified the above from the docs to show you how to put html in there using the echo command. Alternatively you can close the php tag, insert html, and the open the php tag again just as you did in the post. Like: ?> html goes here <?php The example here is all you need to insert html at your chosen hook location, just change pagelines_branding_icons_end to your chosen hook.

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  

×