More hooks issues..
2 replies to this topic
Posted 02 March 2012 - 12:24 AM
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:My test site is: Any help much appreciated! Many thanks, Joe.
Posted 02 March 2012 - 03:32 AM
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):