Add Phone in navbar in desktop, only icon in mobile

Hi!

I’m new at this theme and I’m trying to solve common problems that I can’t fix even reading the support forum. I’m trying to put the phone number on the right of my navigation (as requested here https://theme.co/apex/forum/t/add-telephone-number-to-navigation-bar/52275 but the solutions doesn’t fits me). When the width is behind the breakpoint and the navigation collapses, I need the phone to remain visible, so the only things I have to see in a collapsed header is: logo + phone + navigation icon.

It’s possibel to do this with X Theme? I’ve done it with the rest of the themes I sold, so I took it for granted.

Thanks!

Hi @NestorEtecnia,

Please follow these steps:

  • Add the following code under Theme Options > JS:
jQuery(document).ready(function($) {
	$('<a class="nav-phone" href="tel:+01234567890">01234567890</a>').insertAfter($('#x-btn-navbar'))
});
  • Add the custom CSS under Theme Options > CSS:
a.nav-phone {
    float: right;
    margin: 30px 5px;
}

Hope it helps :slight_smile:

Thank you very much, it works perfectly!

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.