Skip to content

PHP Customization: How to add 2 phone numbers in the top bar?

1 minute read

  1. 1 Find /wp-admin/themes/myhome/header.php
  2. 2 Backup file
  3. 3 Edit file
  4. 4 Find

<?php if ( My_Home_Theme()->layout->has_header_phone() ) : ?> <span class="mh-top-header__element mh-top-header__element--phone"> <a href="tel:<?php echo esc_html( My_Home_Theme()->layout->get_header_phone_href() ); ?>"> <i class="flaticon-phone"></i> <?php echo esc_html( My_Home_Theme()->layout->get_header_phone() ); ?> </a> </span> <?php endif; ?>

5. Change to

<span class="mh-top-header__element mh-top-header__element--phone"> <a href="tel:01234567890"> <i class="flaticon-phone"></i> 0123-456-7890 </a> / <a href="tel:0321-654-9876"> 0321-654-9876 </a> </span>

6. It will look like this:

7..

Ask the people who build MyHome WPBakery

We answer by email from support@tangiblewp.com. With Premium Support, we also fix your site when something breaks.

Was this guide helpful?