Okay
  Public Ticket #1975706
Can not click on phone number in header
Closed

Comments

  • ryanteixeira started the conversation

    Hi,

    Many of the headers have a nice container for the phone number that displays it bold, however it can not be made to be clickable link, to automatically call the number when clicked on like in other areas.

    Usually this works: 

    <a href="tel:123-456-7890">123-456-7890</a>

    But it does not work in the text box for customizing the header.

    Other headers have a "link" box. I am unsure of the workaround other than using the top bar headers that have clickable links.  

    Can I fix this? The header shown inb the attachmen is header 21.

    Thanks!

    Ryan

    Attached files:  Screen Shot 2019-04-15 at 8.03.49 AM.png

  •  1,291
    Bryan replied

    Hello

    I can help you change the text box type to textarea type to make it allow to work with html code. 

    If you need, please provide an admin account so i can help you change it.

    Thanks 

  • ryanteixeira replied

    Hi Linh, I am building my site on a local server, it is not accesible. I'm sorry.

    I do have access to the Header-21 php file we can modify.  Is that what we need to do? I added a screen shot of it

    Thanks,


    Ryan

    *** Begin Header 21.php

    <header id="page-header" <?php Tractor::header_class(); ?>>
    <div id="page-header-inner" class="page-header-inner" data-sticky="1">
    <div class="container-fluid">
    <div class="row">
    <div class="col-xs-12">
    <div class="header-wrap">

    <div class="header-left">
    <?php get_template_part( 'components/branding' ); ?>
    </div>

    <?php get_template_part( 'components/navigation' ); ?>

    <div class="header-right">
    <?php
    $info_text     = Tractor::setting( 'header_style_21_info_text' );
    $info_sub_text = Tractor::setting( 'header_style_21_info_sub_text' );
    $info_icon     = Tractor::setting( 'header_style_21_info_icon' );
    if ( $info_text !== '' || $info_sub_text !== '' ) { ?>
    <div class="header-info">
    <div class="info-wrap">
    <?php if ( $info_icon !== '' ): ?>
    <div class="info-icon">
    <span class="<?php echo esc_attr( $info_icon ); ?>"></span>
    </div>
    <?php endif; ?>

    <div class="info-content">
    <?php if ( $info_text !== '' ): ?>
    <div class="info-text"><?php echo esc_html( $info_text ); ?></div>
    <?php endif; ?>

    <?php if ( $info_sub_text !== '' ): ?>
    <h6 class="info-sub-text"><?php echo esc_html( $info_sub_text ); ?></h6>
    <?php endif; ?>
    </div>
    </div>
    </div>
    <?php } ?>

    <?php Tractor_Templates::header_search_button(); ?>

    <?php Tractor_Woo::header_mini_cart(); ?>

    <?php Tractor_Templates::header_open_mobile_menu_button(); ?>

    <?php Tractor_Templates::header_button( array( 'extra_class' => 'glint-effect' ) ); ?>
    </div>
    </div>
    </div>
    </div>
    </div>
    </div>
    </header>



    Attached files:  Screen Shot 2019-04-16 at 7.03.07 AM.png
      header-21.php

  •  1,291
    Bryan replied

    Hello

    You can try to edit file as my image bellow to change it:

    http://prntscr.com/nd1dy4

    wp-content\themes\tractor\customizer\header\style-21.php.

    Thanks

  • ryanteixeira replied

    Hi Linh,

    I changed the field to "textarea" as you described, but it does not work. Please see the screen shots attachment and let me know if you have another suggestion?

    Thanks,


    Ryan

    Attached files:  Screen Shot 2019-04-20 at 3.51.26 PM.png
      Screen Shot 2019-04-20 at 3.55.32 PM.png

  •  1,291
    Bryan replied

    Hello

    Please change the php code to wp-content\themes\tractor\components\header\style-21.php file then set up text again.

    <a class="info-text"><?php echo esc_html( $info_text ); ?></a>

    http://prntscr.com/nf6v54

    Thanks

  • ryanteixeira replied

    Hi,

    Unfortuantely, I've tried all of the suggestions given, they do not enable the phone number to be a clickable link.  

    Somehow, we want to make the 'Info Sub Text' field a clickable link.  This field also has the H6 tag, which we want to keep, such that the phone number has the correct formatting and not regular body text.

    Thanks,

    Attached files:  Screen Shot 2019-04-26 at 7.23.42 AM.png

  •  1,291
    Bryan replied

    Hello

    Please provide an admin account and ftp account so i can help you modify the theme code to get that.

    Thanks

  • ryanteixeira replied

    Hi Linh,

    I’d love to do that, but I am building the website on a local server before migrating it to the domain. 

    If you want, you can send me modified files for the header and the style, and then I can replace them. That’s probably the best solution and hopefully you will include the new files in the next update.

    I’m sorry for the inconvenience.  I am very happy with the theme and this will help.

    Thanks!

    Ryan

  •  1,291
    Bryan replied

    Hello

    Yes you can send me the edit file or i will send it for you.

    I will notice our developer to check and consider to update it. 

    Thanks

  • ryanteixeira replied

    Hi Linh,

    Here are the files to modify.

    Thank you for your help!


    Ryan

    Attached files:  style-21.php
      header-21.php
      Screen Shot 2019-04-26 at 7.23.42 AM.png

  •  1,291
    Bryan replied

    Hello

    I attached file for the modify code to get link for the phone. 

    Thanks

    Attached files:  style-21.zip
      header-21.zip

  • ryanteixeira replied

    It works perfectly!


    Thank you very, very much. Let's close this ticket.


    Best,


    Ryan

  •  1,291
    Bryan replied

    Hi 

    I hope you're happy with it.

    Please contact if you have any problem so i can help you check.

    Your satisfaction is our pleasure - Please vote and send your comments to us if you happy with our products and support.

    Thanks a lot!