Jump to content
Sign in to follow this  
nfp1900

Adding additional content to the header

Recommended Posts

nfp1900

I have designed this site which is still in dev using platform pro. However, the client is asking for a button to be on the top right which will redirect to a URL for their booking system. Is this possible?

Share this post


Link to post
Share on other sites
nfp1900

Hmm, I was sort of hoping us novice CSSers would get some help here... I located this posting: I used the pagelines-inside-top-branding hook. The following is the code I entered into the functions.php : add_action('pagelines_inside_top_branding','add_mainimg_to_header');???function add_mainimg_to_header() {???$mainimg_url = "http://www.synergiainsight.com/feature/wp-content/uploads/2011/06/header_img031.jpg";????>???" border="0" alt="Header Image" id="mainimg" />???<?php???} Initially I thought this wasn't working because image was appearing above the logo, but I then inserted the following CSS Rules in the Custom Code section of the PlatformPro admin #branding .content-pad img#mainimg {???float: right;???margin-top: 0px;???margin-right: -5px;???} ------ So I looked at the functions.php file in textwrangler - is it just a case of dropping the code in there and saving it back to the server? And for the custom CSS, I guess I just need to fiddle until I get the image located where I want? Thanks for any assistance.

Share this post


Link to post
Share on other sites
cmunns

Yes you can add it to PlatformBase functions file and save it back to server but you want your function to be more like this: ` add_action('pagelines_inside_top_branding','add_mainimg_to_header');??? function add_mainimg_to_header() {?> Header Image ???<?php??? } ` Then add your `` tags for link as necessary

Share this post


Link to post
Share on other sites
nfp1900

Hi Adam I created a test gif button and added the URL to the code you supplied in the functions.php file as follows: `code`add_action('pagelines_inside_top_branding','add_mainimg_to_header'); function add_mainimg_to_header() {?> <?php }`code` However, all I get now is the text "header image' above the logo. I am looking for this button to be somewhere above the social media icons. Also, where in the code would the tag go for the link? Thx for your help, much appreciated!! Nick sorry ---but I can't get the URL in the code to post in this thread!!

Share this post


Link to post
Share on other sites
catrina

Nick, you can use backticks (`) on either side of the link so that it can post.


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
nfp1900

Thx Catrina, here is the code I used in the functions.php file and which doesn't seem to pull in the graphic to the correct location: add_action('pagelines_inside_top_branding','add_mainimg_to_header'); function add_mainimg_to_header() {?> <img src="`http://www.prestigecarsandcouriers.co.uk/wp_prestige/wp-content/uploads/2011/06/TESTBUTTON.gif`" border="0" alt="Header Image" id="mainimg" /> <?php }

Share this post


Link to post
Share on other sites
cmunns

Okay then use this hook location : `pagelines_branding_icons_start`

Share this post


Link to post
Share on other sites
kalciov

Hi there, I try to do insert a new logo on the right side of the header, right to the facebook & RSS icons (on whitehousepro). http://www.calci-patrimoine.com/ I've tried what you write Adam, but nothing appear. Should I make a specific topic in the whitehouse pro forum ? Thanks for your great work !

Share this post


Link to post
Share on other sites
Kate

Hi Anthony, Since it's a different theme, yes... I would suggest posting the topic in the WHP category.

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  

×