• yatiya

    (@yatiya)


    Hello all

    How do I turn this:

    <div class="icon-left-top bgnone">
              <?php if( '' !== get_theme_mod('contact_no')){ ?>
              <a><i class="fa fa-phone fa-1x"></i><?php echo str_replace ('^','<br /> ',get_theme_mod('contact_no', ':+1 800 234 568')); ?>
              <?php } ?>
              </a></div>

    into two phone numbers, on two lines, each clickable?

    Right now, it gets me the two numbers on two lines part, but no clicks.

    View at https://www.entdocatiya.co.za

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mike

    (@mike_vl)

    You have both numbers wrapped in one single a href.

    You have this in your theme:

    <div class="icon-left-top bgnone">
    <a><i class="fa fa-phone fa-1x"></i>Pinehaven: +27 11 950 5400<br>Rosebank: +27 11 788 6389 </a>
    </div>

    Below you can see both numbers wrapped in their own a href.

    <div class="icon-left-top bgnone">
      <a><i class="fa fa-phone fa-1x"></i>Pinehaven: +27 11 950 5400</a><br>
     <a>Rosebank: +27 11 788 6389</a>
    </div>
    Thread Starter yatiya

    (@yatiya)

    YES! That split them up. However, nothing happens when I click/tap on them? Do I need to add a tel: command somewhere? or maybe an href?

    So, with this method, I’ll have to edit the numbers manually if they ever change, right? The previous code linked them to the customizer. I don’t mind, I’m just curious.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Header Phone number’ is closed to new replies.