Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1169149
    Fedde
    Participant

    Hey guys,

    I have a phone number added in my navbar, its a page right now. I would like to directly link that menu link to a facetime call. I think it should be possible using one of the html links shown at: https://developer.apple.com/library/ios/featuredarticles/iPhoneURLScheme_Reference/FacetimeLinks/FacetimeLinks.html

    My question is how to directly link the menu link to the facetime call, so it wont go to the page i created for the menu link.

    URL: http://www.feddewestera.nl/

    Thanks in advance!

    #1169197
    Thai
    Moderator

    Hi There,

    Please add the following code to the HREF field of your menu item:

    – Video Call: facetime:14085551234
    – Audio Call: facetime-audio:14085551234

    Hope it helps 🙂

    #1170843
    Fedde
    Participant

    Hi,

    Thanks for the fast reply. I can add the HREF field on a custom link in the menu section, but it won’t accept the facetime code. When you save the settings the code just fades.

    Am i doing something wrong?

    #1170868
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! I have tested in my local testing server and indeed the menu doesn’t accept the facetime in the href. I would suggest that you add this following code in your child theme’s functions.php file;

    // Add custom menu facetime menu
    // =============================================================================
    function custom_facetime_menu_item( $items, $args ) {
    
      if ( X_WOOCOMMERCE_IS_ACTIVE && x_get_option( 'x_woocommerce_header_menu_enable' ) == '1' ) {
        if ( $args->theme_location == 'primary' ) {
          $items .= '<li class="menu-item x-menu-item x-menu-item-facetime">'
                    . '<a href="facetime:14085551234" class="x-btn-navbar-facetime">'
                      . 'FaceTime'
                    . '</a>'
                  . '</li>';
        }
      }
    
      return $items;
    
    }
    add_filter( 'wp_nav_menu_items', 'custom_facetime_menu_item', 9999, 2 );
    // =============================================================================

    Please let us know how it goes.

    #1170950
    Fedde
    Participant

    Upon adding that code in my function.php i get the following error + white screen: Parse error: syntax error, unexpected end of file in /home4/fedde95/public_html/feddewestera.nl/wp-content/themes/x-child/functions.php on line 75

    #1170951
    Fedde
    Participant

    Ah i got the code in without getting the white screen + error now. Whats the next step?

    #1170954
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! Could you please update the code and use this instead:

    // Add custom menu facetime menu
    // =============================================================================
    function custom_facetime_menu_item( $items, $args ) {
    
      if ( $args->theme_location == 'primary' ) {
        $items .= '<li class="menu-item x-menu-item x-menu-item-facetime">'
                  . '<a href="facetime:14085551234" class="x-btn-navbar-facetime">'
                    . 'FaceTime'
                  . '</a>'
                . '</li>';
      }
    
      return $items;
    
    }
    add_filter( 'wp_nav_menu_items', 'custom_facetime_menu_item', 9999, 2 );
    // =============================================================================

    If nothing else works, would you mind providing us the ftp login credentials so we can take a closer look? This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your credentials, we will be happy to assist you with everything.

    To do this, you can make a post with the following info:
    – WP username
    – WP password
    – FTP Hostname
    – FTP Username
    – FTP Password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    Thank you.

    #1171001
    Fedde
    Participant

    It worked! Thanks a bunch!!

    #1171014
    Rad
    Moderator

    You’re most welcome!

  • <script> jQuery(function($){ $("#no-reply-1169149 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>