Jump to content


Photo

Customize Nav Bar

Nav Bar

  • Please log in to reply
12 replies to this topic

#1 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 07 October 2012 - 03:43 AM

Hello All,

I was seeing if there is a way to put my business phone number into the nav bar of my site (and look good). I don't mind getting rid of search bar if needed. I'm looking for a way to have the phone number in front of the visitor at all times.

Thanks

#2 batman

batman

    Bat Learning

  • Members

  • 1774 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 07 October 2012 - 08:57 AM

Hi danmeeler

You can add an action for add phone inside NavBar

You can find at
http://api.pagelines.com/hooks
You can see this links to begin:
http://www.pagelines...ustomize_Plugin
http://codex.wordpress.org/Plugin_API

For example
add_action('get_search_form', 'brandnav_phone');
function brandnav_phone() { ?>
<ul>
<li><a>155-9184745</a></li>;
</ul>
<?php }

Other simple way is add the telephone number in your logo image.
;)

#3 Danny

Danny

    Is Awesome!

  • Moderators
  • 13234 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 07 October 2012 - 09:13 AM

HI,

Did Batman's post assist you or do you need further help?

#4 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 07 October 2012 - 07:02 PM

I tried that just now and its not working for me. I got it to sow but its making my nav bar bigger and its on top of the words in the navbar.

#5 Danny

Danny

    Is Awesome!

  • Moderators
  • 13234 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 10 October 2012 - 10:02 AM

Hi,

Can you please add the code again and inform us when you have done so, we can then take a closer look.

#6 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 11 October 2012 - 03:39 PM

Posted Image

This is how its showing on my nav bar, I would like it all the way to the right and the font bigger. Here is the code i have in my Customize plugin


add_action('get_search_form', 'brandnav_phone');
function brandnav_phone() { ?>
<a>(888)592-4901</a>
<?php }

#7 James B

James B

    Advocate

  • Moderators
  • 4985 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 12 October 2012 - 03:56 AM

Hi there, you'll need to add a class to the hook you've inserted and then you can adjust using css to align the text in the navbar better.

http://www.w3schools...lobal_class.asp

#8 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 12 October 2012 - 07:26 PM

I attempted to add a class to the section, but it still wont format right. It looks the exact same as my screen shot above.

#9 batman

batman

    Bat Learning

  • Members

  • 1774 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 12 October 2012 - 08:02 PM

You need add in
PageLines > Site Options > Custom Code > CSS Rules

It is advisable to learn how to do this on your own too.
Check out http://www.pagelines...wiki/Custom_CSS

and of course see:
http://www.w3schools...lobal_class.asp
like James B said to you

#10 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 14 October 2012 - 02:38 PM

Its just not working for me, Thanks for everyone's help.

#11 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 14 October 2012 - 08:06 PM

Dan,
Please go to Dashboard > Appearance > Menus.

Create a new custom menu item. For the URL, please enter # and for the label, add your phone number.

Save it and place it where you want it to appear in the menu line up. Save the menu in general.

Look at your site. The phone number will be found in the menu.

Let us know if this works.

#12 danmeeler

danmeeler

    Member

  • Members
  • PipPip
  • 16 posts

Posted 15 October 2012 - 01:29 AM

Thanks, that's not the look I'm going for. I appreciates everyone's help though.

#13 Danny

Danny

    Is Awesome!

  • Moderators
  • 13234 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 15 October 2012 - 09:24 AM

Hi,

Batman's suggestion is the best method to use, but you will need to apply some CSS to your contact information. The best way to do this would be to wrap your contact info in a div which a custom class.

The below code is just an example, you will need to use your own code, this is just for demonstation purposes.


 
add_action(&#39;get_search_form&#39;, &#39;navbar_contact&#39;);
function navbar_contact() { ?>

<div class="navbar-info">
<p>155-9184745</p>
</div>
<?php 
}

With that div class, you can apply custom CSS to it, for example:

 .navbar-info { float: right; text-align: left; font-size: 14px; color: green; }






Also tagged with one or more of these keywords: Nav Bar