CYBER MONDAY SALE! 30% DISCOUNT!! Coupon code:cm30 Enjoy!!!

Add Phone Number above Menu

Home Forums Explore Free Add Phone Number above Menu

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Ashish 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1381573

    jamecky
    Participant

    Is there a way to add a phone number right-aligned above the main menu in the header without messing up the menu?

    Thanks

    #1381686

    Ashish
    Moderator

    Hi @jamecky
    You can add a phone number in a text widget from Appearance > Widgets and assign that widget to any of the Header Sidebar One, Two or Three. Then, you can see the phone number from widget in header in frontpage of your site.

    Regards,
    ThemeGrill Support Team.

    #1381694

    jamecky
    Participant

    Not what I would want as you have to click on the button to display those widget areas. I want the phone number displayed at all times.

    i.e.

    800-333-4444
    Home Services Overview Contact

    #1381793

    Ashish
    Moderator

    Hi @jamecky
    If you have some idea of HTML and PHP and WordPress child theme, you can create a child theme as instructed here:
    https://themegrill.com/blog/tutorial-creating-wordpress-child-theme/

    And, then, add the following code inside functions.php file of your child theme:

    function explore_phone_number()
    {
      ?>
      <div class="tg-before-header">
        <div class="inner-wrap">
          <?php esc_html_e( 'Phone Number: 800-333-4444', 'explore' ); ?>
        </div>
      </div>
      <?php
    }
    add_action( 'explore_before_header', 'explore_phone_number', 10 );

    Also, add the following CSS code inside style.css file of your child theme.

    .tg-before-header .inner-wrap {
        padding: 10px 0;
    }

    Thanks.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.