Jump to content
Sign in to follow this  
jshavit

Add Custom Button to Header

Recommended Posts

jshavit

Hello, First of all, thank you for reading this. I am desperately trying to add a ???Client Login??™ button to the header, ideally in line with the social media icons. I have tried following other posts to add this feature and have had zero luck. I know very little about PHP, and I have a slight grasp on hooks, but I am pretty decent at following directions... The test site is http://www.hsni2010.com/WordpressTest/ The image I??™ve created for the button can be viewed here http://www.hsni2010.com/WordpressTest/wp-images/ClientLoginBtn.gif I really appreciate any and all help!

Share this post


Link to post
Share on other sites
Andrew

Are you all set up with the child theme? you could add a hook like this, for example, ` add_action('pagelines_after_branding_wrap', 'add_that_image'); function add_that_image(){ echo 'ClientLoginBtn.gif'; } `

Share this post


Link to post
Share on other sites
jshavit

Andrew, thank you very much for the response. It was extremely helpful and my button is now active! Sidenote: Love Platform Pro. Started out using Thesis and when I switched over it was a real lifesaver!! So thanks again :)

Share this post


Link to post
Share on other sites
jshavit

Thought the problem was solved with the code I entered, thanks to Andrew - found out that the navigation is now dropping into the main content area in IE and showing up as a list in Safari. Both issues are resolved once I take out the PHP. Here is the code I entered into the functions.php file - can't seem to show the echo portion which is probably the most vital...won't let me display the text...

// add_action('hook_name','function name');
add_action('pagelines_after_branding_wrap', 'add_clogin_image');
function add_clogin_image(){
echo''; }
// end function

I took the button down for now. Please help. I must have messed something up in the code... thanks!

Share this post


Link to post
Share on other sites
bryan-hadaway

Hold tight for further developer help. Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

If you put the button back up we can take a look and de-bug with the IE dev toolbar.

Share this post


Link to post
Share on other sites
jshavit

I put the button back up - sorry I forgot I took it down...oops. I know that the site is painfully slow too. Thank you!

Share this post


Link to post
Share on other sites
cmunns

I think the HTML is just incorrect, possibly because of where the code is being inserted but it's hard to tell can you place the code here that you used and use the ` (backtick mark to wrap the code)

Share this post


Link to post
Share on other sites
jshavit

Thanks - I'm sure it's the problem too :) For the life of me I cannot get the code to display - it just shows the image of the button no matter what I try (honest). Hope this makes sense. Sorry for the trouble, but I really appreciate the help!! If you take the code that Andrew gave me above, I added before the '<img src...' the link for the button 'a href'and I did not close the link with the '/a'

Share this post


Link to post
Share on other sites
cmunns

If you use those backticks to wrap code we'll be able to see exactly what you have in the code that may be causing the flummox. `wrapped code looks like this`

Share this post


Link to post
Share on other sites
jshavit

I took a slightly blurry screenshot of my functions.php - the code I added for this button is toward the bottom. Hope this is helpful as I seriously cannot get my code to show up in this comment area...I know it sounds absurd but I swear it's true. Thank you!!!!!!!!!! http://hsni2010.com/email/screenshot.jpg

Share this post


Link to post
Share on other sites
cmunns

It looks like you are missing a closing `` tag. So it would go here `...alt=""/>';`

Share this post


Link to post
Share on other sites
jshavit

Thank you! I added that in and all seems to be well! Thank you for your help and patience!!!!

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  

×