Jump to content
Sign in to follow this  
Gavin_

Adding buttons to header using hooks

Recommended Posts

Gavin_

Hi I've read a few threads and I'm not sure what I have done wrong. I'd like to add to buttons to the header and for them to be inline with the social media icons. here is what i tried add_action('pagelines_before_branding_icons', 'add_button_to_branding'); // function name function add_button_to_branding (){ ?> call-me-back.png <php } // end function but it just broke the site!! cheers for any help. the site is here http://79.170.44.130/ginseng-lily.co.uk/

Share this post


Link to post
Share on other sites
ricardo

Gavin, You need to use the code tag when posting code here otherwise we can't see it properly. Ricardo

Share this post


Link to post
Share on other sites
Gavin_

i think it should be

add_action('pagelines_before_branding_icons', 'add_button_to_branding');
	
	// function name
	function add_button_to_branding (){ ?>
	
	< href="http://79.170.44.130/ginseng-lily.co.uk/call-me-back/">
	<php
	}
	// end function
	[/code]

Share this post


Link to post
Share on other sites
ricardo

The only thing I see, and I'm not sure it's due to the problems putting the code here, it's the missing "?" at the function end. Should be:

	<?php }

Ricardo

Share this post


Link to post
Share on other sites
Gavin_

Great spot Ricardo - thanks. i am trying to add another button and this code works on chrome but not on firefox?

add_action('pagelines_before_branding_icons', 'add_button_to_branding');
	
		// function name
		function add_button_to_branding (){ ?>
		
		
	
		<?php
		}
	
		// end function[/code]

any ideas? also how do i add the hover effect? thanks for any help in advance

Share this post


Link to post
Share on other sites
ricardo

See how they did the other buttons. It's just one image that has the overflow hidden and shows the hidden part on mouseover. Ricardo

Share this post


Link to post
Share on other sites
Gavin_

sorry Ricardo I didn't get your answer i'm a total newb. i have two questions: 1; the second lot of code i have posted is not working in firefox and i don't know why as it does work in chrome. i guess it could be a cache problem? 2: how do i add a hover effect? thanks

Share this post


Link to post
Share on other sites
catrina

What kind of hover effect are you looking for (i.e. fade to gray)?


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
ricardo

Gavin, See if you can this tutorial, which is the same thing done in PlatformPro. Ricardo

Share this post


Link to post
Share on other sites
Gavin_

Hi Ricardo, I will give it a try THanks

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  

×