Jump to content
Sign in to follow this  
joe_steer

More hooks issues..

Recommended Posts

joe_steer    0
joe_steer

Hi Guys, Does anyone know of a reason why I wouldn't be able to use both the hooks 'brandnav_after_brand' and 'brandnav_after_nav' at the same time? I'm trying to add both some text and some icons to my header section. Either of the hooks work on their own, but only the first will work if they are both there.. here's my code in functions.php:

add_action('brandnav_after_brand', 'add_text_to_brandnav');
	
		// function name
		function add_text_to_brandnav(){
			?>
	
TELEPHONE: 0208 123 12345. EMAIL: INFO@LONDONLANDMARK.CO.UK
<?php } // end function add_action('brandnav_after_nav', 'social_icons'); // function name function social_icons(){ ?>
Linked In Twitter Facebook
<?php } // end function[/code]

My test site is: http://tinyurl.com/7rk7dqu Any help much appreciated! Many thanks, Joe.

Share this post


Link to post
Share on other sites
catrina    103
catrina
By default, you can't use the same hook twice. If you want to use a hook to add your elements (whether it'd be links or images or text) to a certain portion of the page, you can add the content to that one hook instead of using two or more of the same hook to add your content. In your code, move the code for social icon links below the DIV layer code for the text in the hook at the top so that it looks like this (and then eliminate the second hook since it'll be useless/empty): [code]
TELEPHONE: 0208 123 12345. EMAIL: INFO@LONDONLANDMARK.CO.UK
[/code]

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
joe_steer    0
joe_steer
Of course! thanks Catrina.

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