Phone Number Top and Center in Header

Recommended Posts

brentwalker500
0

brentwalker500 0

Hi, I understand that the header is not editable through the Platform framework which is fine, the theme offers so much else it's amazing. But one of the things I would like to do is drive my sites visitors to call me so I'd like to have the phone number up top and center on every page. Now, I'm not the most technical among this group so if you are able to please provide detailed instructions I would very much appreciate it.
http://www.webwalkersolutions.com
Thanks!

Share this post

Link to post

Share on other sites

kgstew
2

kgstew 2

Hey Brent,
The easiest way to do this, other than editing the header, is to use hooks. You can find a description of how to use the hooks in Platform here http://www.pagelines.com/docs/base-child-theme
You can use the hook "pagelines_before_header" to put the phone number on the top of your page and center it.
Cheers

Share this post

Link to post

Share on other sites

brentwalker500
0

brentwalker500 0

Hi kgstew, first of all thanks.I watched the video and read the content on the Pagelines site and wordpress.org .. it seems like it may be a bit much for me but I'll sleep on it and see how it "feels" tomorrow.

Share this post

Link to post

Share on other sites

catrina
103

catrina 103

If it helps, the first step is to become familiar with how a hook is formatted and then you determine what HTML needs to be added inside it so that the phone number is displayed. As long as the right hook is added, the steps after that (the HTML and positioning the phone number CSS) are quite easy.

Please read the docs before posting. Please do not private message me unless I ask you to.

Share this post

Link to post

Share on other sites

catrina
103

catrina 103

I explained the basic anatomy of a hook to another forum user here: http://www.pagelines.com/forum/discussion/comment/66866#Comment_66866 (it's a direct link to my explanation - hooray for no scrolling through a topic!)
That user's goal was to add an image to the right side of the header where the search bar traditionally is. Even though your goal is different, the set-up is still the same so my explanation still applies. It'll help you get started and when you need more specific help, please post any questions here.

Please read the docs before posting. Please do not private message me unless I ask you to.

Share this post

Link to post

Share on other sites

brentwalker500
0

brentwalker500 0

so, do i add this code in the 'custom code' section? If so, which box? If not, then where.
Could you please just spell this out in a simple step by step format?
Step 1. go to Custom Code
Step 2. enter the hook code "blah blah" in the 'header scripts code' section...
That would be immensely helpful to me.

Share this post

Link to post

Share on other sites

Rob
547

Rob 547

Brent, the directions for adding a hook are right here: Please read them and follow the video. Candidly, before I did anything I read it several times and watched the video an equal number. When I was actually doing the hook, I stopped and started the video for step-by-step activity.
http://www.pagelines.com/docs/base-child-theme
You do not add that code Catrina provided in August to Custom Code. That's the hook which you have to customize to include whatever you wish in the header. I'm sorry, but in a forum setting, we can't really write custom code for you. The hook goes into functions.php located in your platformbase folder. You need an FTP program. The platformbase folder is located in your WP installation root/wp-content/themes/platformbase
Kgstew guided you months ago (see above in this thread) where to place the hook and make your edits. This really isn't terribly complicated. If I could do it, adding a Google AdSense leaderboard, you can add your phone number. I have confidence in you.

Share this post

Link to post

Share on other sites

brentwalker500
0

brentwalker500 0

well.. I've finally got a start:
add_action('pagelines_head', 'add_phone_number');
// function name
function add_phone_number(){
// This hook adds a phone number to the header of your theme. The class referenced in the link can be seen in the style.css
?>