Add phone number/contact details to the header

Discussion in 'Compass WordPress Theme' started by matthewford, Jan 18, 2015.

  1. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    How can I add a phone number and email address to the header?
     
  2. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello !


    For this you have to add some code in header.php file please follow below image.
    compass-header-19.png

    HTML:
    <div class="grid_24">
    <div class="grid_5 omega hello-header">
     
    Hello ------------------!
     
    </div>
     
    <div class="clear"></div>
    </div>
    Thanks & Regards
    Pramod
     
  3. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    Hi,

    Thanks for this. I tried this and it just adds text literally above the logo which doesn't look great. What would be great if we could have the logo on the left and then a phone number button on the right and then the menu below them. Something like the way it shows in the BlackRiders theme. I love the Compass theme and it is just the telephone number visibility that concerns me.

    Any suggestions on how I could achieve this?

    Thanks in advance

    Matt
     
  4. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello !

    You have to follow two steps.

    Step 1:
    PHP:
    <div class="header">
              <div class="grid_8 alpha">
              <div class="logo">
                <a href="<?php echo home_url(); ?>"><img src="<?php if (inkthemes_get_option('inkthemes_logo') != '') { ?><?php echo inkthemes_get_option('inkthemes_logo'); ?><?php } else { ?><?php echo get_template_directory_uri(); ?>/images/logo.png<?php ?>" alt="<?php bloginfo('name'); ?> logo"/></a>
            </div>
              </div>
    <div class="grid_4 main header">
    <p class="text-header">
      jdgjhadjafdjaff
    </p>
    </div>
    <div class="clear"></div>
              <div class="grid_24 omega">           
              <div class="menu_wrapper">
              <div id="MainNav">
                <?php inkthemes_nav(); ?>                     
              </div>
            </div>
              </div>     
    <div class="clear"></div>         
    </div>
    compass-header-21.png
    Delete your code and use above code as mentioned in image.


    Step 2:
    Paste the code given below in Custom CSS section
    (Appearance -> Theme Options -> Styling Options -> Custom CSS) of your dashboard.

    Code:
    p.text-header {
    float: right;
    margin-right: 25px;
    background: rgb(102, 183, 198);
    padding: 7px;
    border-radius: 4px;
    box-shadow: 1px 1px 10px rgb(102, 183, 198);
    color: white;
    }
    .grid_4.main.header {
    float: right;
    margin: 0px;
    padding: 10px;
    }

    Thanks & Regards
    Pramod
     
  5. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    Thank you, that's what I was after.
     
  6. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    This works OK but the number is not aligned with the logo and appears below it, it appears ok on mobile view but looks odd with a normal browser. Is there a way in which I can bring it up in line with the logo? See attached screenshot.
     

    Attached Files:

  7. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    This also causes the menu bar to move down leaving a bigger gap
     
  8. praveen

    praveen Support Staff

    Joined:
    Jan 1, 2015
    Messages:
    2,344
    Likes Received:
    67
    Hi,

    please provide us the URL of your website.

    Thanks,
    Praveen
     
  9. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
  10. praveen

    praveen Support Staff

    Joined:
    Jan 1, 2015
    Messages:
    2,344
    Likes Received:
    67
    Hi matthewford!

    Please paste the code given below in Custom CSS section
    (Appearance -> Theme Options -> Styling Options -> Custom CSS) of your dashboard.

    Code:
    @media only screen and (max-width: 767px){
    .mean-container .mean-nav ul {
    display: block !important;
    }
    }
    Thanks,
    Praveen
     
  11. matthewford

    matthewford Member

    Joined:
    Jan 16, 2013
    Messages:
    55
    Likes Received:
    0
    Unfortunately this has made it even worse, I could email you access details if you wanted to have a look yourself?
     
  12. praveen

    praveen Support Staff

    Joined:
    Jan 1, 2015
    Messages:
    2,344
    Likes Received:
    67
    Hi matthewford!

    Please download and install a fresh copy of this theme.
    If the issue doesn't resolve then provide us your wordpress login details at [email protected].

    Thanks,
    Praveen
     
  13. praveen

    praveen Support Staff

    Joined:
    Jan 1, 2015
    Messages:
    2,344
    Likes Received:
    67
    Hi matthewford!

    We have fixed your issue.Please have a look at your website.

    Thanks,
    Praveen
     

Share This Page