Jump to content
Sign in to follow this  
julianyoung

Header modification

Recommended Posts

julianyoung

I'm looking to add a telephone number and working email address link at the top right of my site (above the social media buttons) so a css override won't hack it (since the link needs to work) I'm using pagelines pro, if I modify the header template directly I know I'll be asking for trouble next time another update comes along, is there a good way to hook in some additional code up there without causing an upgrade issue later down the road?

Share this post


Link to post
Share on other sites
bryan-hadaway

This can be done with a hook, but that's not my area of expertise. If you want to give the manual method a shot, you could just make a note of it in a text file and update it next time you upgrade considering you need to or want to upgrade. Or, if you're setup with PlatformBase, you can make "manual" updates without upgrade worries. `

555.123.4567 | email@website.com

` dropped just below: `

` in Appearance > Editor > template.branding.php then we can style in Custom Code > Custom CSS however we need starting with: `.quickcontact{text-align:right}` You could give me the link after implemented all that and we could go from there. Thanks, Bryan

Share this post


Link to post
Share on other sites
julianyoung

Haha Bryan you champ (and Karma hoe). No need to code it up for me mate, this was purely a theoretical question :) Right, I'll read up on hooks. I don't want to be worrying about remembering text files during updates later down the road. I have enough clients whose text files I need to remember already >< Platform Base? What is this? I had a look at my downloads as well as the 'add product' page and couldn't see anything about it.

Share this post


Link to post
Share on other sites
catrina

Go to Appearance > Themes and it should be listed since it's packaged with PlatformPro. It's the child theme.


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
julianyoung

Ahh the seperate download. I will install and have a look. Thanks folks.

Share this post


Link to post
Share on other sites
acertis

Hi, Very useful post and suggesstion from Bryan as I am trying to do this on my site. I have tried following your insturctions but the phone number and email address now appear above the social icons, could you please tell me how I go about getting the tel number and email below the social icons and above the search box. Thanks Phil

Share this post


Link to post
Share on other sites
julianyoung

I should probably chip in on what I did...... 1) I installed the base (child theme). 2) I added a style class called contactdetails with a text-align right and a float right. 3) I looked at template.branding.php to find the appropriate hook. For you Phil you would use "pagelines_branding_icons_end" Myself, putting the details above the icons, I found "pagelines_before_branding_icons" 4) I then opened up functions.php (in the child class) and added the following....

//Add action, binds hook to a php function
	add_action('pagelines_before_branding_icons', 'show_contact_details');
// function name
		function show_contact_details(){
			?>
			   <div class="contactdetails">
	                      MY CONTACT DETAILS
	                   </div>
	                <?php }
		// end function
	

Voila, the new display is hooked into the theme and will remain there when I update my main theme.

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  

×