Jump to content
Sign in to follow this  
amforh

How to show social icons in BrandNav section?

Recommended Posts

amforh

Hi, I am using Platform pro and the "BrandNav" section in the header to show the logo and the menu. I would like to add social icons easily, same as in the "Site Branding" section. Thank you in advance, Marcos

Share this post


Link to post
Share on other sites
amforh

Hi, I will take a look at it asap and I will let you know. Thank you very much.

Share this post


Link to post
Share on other sites
fcfellowship

Hey cmunns, I have the exact same issue going on. But, what do you mean by saying "... and use that inside your hook function"? How is that done? Also, my menu is so short that it will fit, in my case. Does this change anything I may or may not need to do? Thank you! - Will

Share this post


Link to post
Share on other sites
timlinson

Hi Will, in the link that Adam posted, he has a video that walks you through the setup of a hook.

Share this post


Link to post
Share on other sites
fcfellowship

Tim, Thank you for the reply. However, and unfortunately, that video does not 'walk me through' the process. I do not know php coding and know VERY little html. That video merely introduced the generalities of setting up a hook. For me, it was like watching a 4 minute video on learning the Greek language. Can anyone please help me with this? I have seen many, many sites that have the logo, menu, and social icons on one horizontal line at the top. I know I and Marcos cannot be the only people who want this done. That being the case, does anyone know where I could find any ready-made code for this? Or, is there anyone who could make the code for me? I am new to this process so any pointers would be helpful. Marcos, if you have figured this out or want to talk about this please feel free to respond here. Thanks.

Share this post


Link to post
Share on other sites
amforh

Hi Will, I am actually working on this. Current status: Unsuccessfully.

Share this post


Link to post
Share on other sites
amforh

Hi, I used the following code in functions.php, but nothing works (keep in mind that my php knowledgment is almost zero):

add_action('pagelines_brandnav_icons_end', 'add_icons_to_brandnav');
	
	function add_icons_to_brandnav(){
	?>
	
	<?php }[/code]

I was wondering if I had to create a template.brandnav.php file in addition. So, I created one and as a result the icons appear but not the menu. Then, I added a wp_nav_menu function and the menu comes up, but the css rules that I applied do not work. Please let me know your thoughts. Thank you, Marcos

Share this post


Link to post
Share on other sites
amforh

Sorry, the code that I put before is not completed. Please look at this:

	add_action('pagelines_brandnav_icons_end', 'add_icons_to_brandnav');
	
	function add_icons_to_brandnav(){
	
	?>
	
	<?php }[/code]

Share this post


Link to post
Share on other sites
amforh

Sorry again, something is going wrong. Lets try again: add_action('pagelines_brandnav_icons_end', 'add_icons_to_brandnav'); function add_icons_to_brandnav(){?> <?php } Sorry, I am not able to place the whole code. Please note that an a href tag is in between the last two lines of code. I am really sorry for the inconveniences.

Share this post


Link to post
Share on other sites
cmunns

use backticks to display code. the code button is unreliable. Backtick is above the tab key on my mac keyboard.

Share this post


Link to post
Share on other sites
amforh

` add_action('pagelines_brandnav_icons_end', 'add_icons_to_brandnav'); function add_icons_to_brandnav(){ ?> <?php } `

Share this post


Link to post
Share on other sites
amforh

Thank you for the backtick trick. I learn a new thing today :)

Share this post


Link to post
Share on other sites
fcfellowship

Hi Marcos, Man, oh, man... you guys are making me feel pretty slow. This stuff is way over my head. For someone with not much php knowledge, you are doing pretty good. How's it coming? Have you got your branding, menu, and icons to show on the same line? I will keep trying on my end, but honestly, you are ahead of where I am so far. If I make a discovery that will help, I will let you know.

Share this post


Link to post
Share on other sites
kastelic

See, what he's doing is writing a function that places any HTML in the location specified (The same location you need to add html to). Where he's got the html code starting with the anchor tag, you can replace with any html whether it be an image, a link, whatever: `` Just replace that with your html code.

Share this post


Link to post
Share on other sites
timlinson

Hey Marcos, `pagelines_brandnav_icons_end` isn't a valid hook name. You can find most of the valid brandnav hooks under Template Setup in the "Advanced Setup" link of the brandnav section. But in your case, I think what you want is one of the unlisted ones: `brandnav_after_brand` or `brandnav_after_nav` (note that these don't have "pagelines_" prefix).

Share this post


Link to post
Share on other sites
amforh

Hi Tim, I will take a look at it when I have a chance. I am busy with other stuff right now :( Thank you very much, Marcos

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  

×