前提・実現したいこと
WordPressにて、下記のテーマを使用し、編集しています。
https://ja.wordpress.org/themes/amazorize/
プレビューをご覧いただければと思います。
発生している問題
画面上部左の三本線と右のMENU共にサイドメニューバーを読み込むようになっているのですが、右のMENUをTELとし、電話がかけられるようにしたいです。
該当のソースコード
<?php /** * The header for our theme * * This is the template that displays all of the <head> section and everything up until <div id="content"> * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials * * @package Amazorize */ ?> <!doctype html> <html <?php language_attributes(); ?>> <head> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-153769363-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-153769363-1'); </script> <meta charset="<?php bloginfo( 'charset' ); ?>"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="https://fonts.googleapis.com/css?family=Alegreya+SC|Almendra+SC|Charmonman:700|Dawning+of+a+New+Day|IM+Fell+English+SC|Junge|Marcellus+SC|Nanum+Myeongjo|Noto+Serif+JP:200|Petit+Formal+Script|Playfair+Display+SC|Quintessential|Vollkorn+SC&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=M+PLUS+1p:300|Sawarabi+Gothic&display=swap&subset=japanese" rel="stylesheet"> <link rel="profile" href="https://gmpg.org/xfn/11"> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <?php wp_body_open(); ?> <div id="page" class="site"> <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'amazorize' ); ?></a> <header id="masthead" class="banner-shadow sheader site-header clearfix"> <div class="content-wrap"> <?php if ( get_theme_mod('amazorize_general_notify_smg') != '' ) : ?> <div class="xgnotification-top" style="background-color:<?php echo esc_html( get_theme_mod('amazorize_general_notify_bg', '#ffffff') ) ?>; color: <?php echo esc_html( get_theme_mod('amazorize_general_notify_text', '#11171a') ) ?>;"> <?php echo wp_kses_post(get_theme_mod('amazorize_general_notify_smg')); ?> </div> <?php endif; ?> <?php if ( get_header_image() ) : ?> <div id="site-header" class="clearfix" > <?php echo do_shortcode('[metaslider id="8"]'); ?> </div> <?php endif; ?> <?php if ( get_theme_mod('amazorize_general_header_banner') != '' ) : ?> <?php if ( ! ( is_single() && get_theme_mod('amazorize_general_header_banner_options_single', 'single_banner_enable') == 'single_banner_disable' ) ) : ?> <div class="campaign-banner" style="background-image: url(<?php echo get_theme_mod( 'amazorize_general_header_banner', '' ); ?>);" ?> <?php if ( get_theme_mod('amazorize_general_notify_smg') != '' ) : ?> <div class="xgbanner-container"> <header class="banner-title" style="color:<?php echo esc_html( get_theme_mod('amazorize_general_header_banner_text_color', '#ffffff') ) ?>;" > <?php echo wp_kses_post(get_theme_mod('amazorize_general_header_banner_text')); ?> </header> </div> <?php endif; ?> </div> <?php endif; ?> <?php endif; ?> <div class="clearfix obi"> <div class="content-wrap"> <?php if ( has_custom_logo() ) : ?> <div class="site-branding branding-logo"> <?php the_custom_logo(); ?> </div><!-- .site-branding --> <?php else : ?> <div class="site-branding"> <?php if ( is_front_page() && is_home() ) : ?> <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> <?php else : ?> <h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2> <?php endif; $description = get_bloginfo( 'description', 'display' ); if ( $description || is_customize_preview() ) : ?> <p class="site-description"><?php echo $description; /* WPCS: xss ok. */ ?></p> <?php endif; ?> </div><!-- .site-branding --> <?php endif; ?> <nav id="primary-site-navigation" class="primary-menu main-navigation"> <?php wp_nav_menu( array( 'theme_location' => 'menu-1', 'menu_id' => 'primary-menu', 'menu_class' => 'pmenu' ) ); ?> </nav><!-- #primary-site-navigation --> </div> <div class="super-menu clearfix"> <div class="super-menu-nav"> <button class="icon-toggle"> <span class="inner-line"><?php esc_html_e( 'Toggle Main Menu', 'amazorize' ); ?></span> </button> <span class="inner-label"><?php esc_html_e( 'Menu', 'amazorize' ); ?></span> </div> </div> </div> </div> </header><!-- #masthead --> <?php if ( have_posts() && is_archive() ) : ?> <div class="section-page-header"> <div class="content-wrap"> <header class="archive-page-header"> <?php the_archive_title( '<h1 class="page-title">', '</h1>' ); the_archive_description( '<div class="archive-description">', '</div>' ); ?> </header> </div> </div><!-- .section-page-header --> <?php endif; ?> <div id="content" class="site-content clearfix"> <div class="content-wrap">
試したこと
ソースコード内の該当部である、
<span class="inner-label"><?php esc_html_e( 'Menu', 'amazorize' ); ?></span>
を
<span class="inner-label"><a href="tel:022-302-6106 ">TEL</a></span>
としましたが、変わらずサイドメニューが展開されました。
すぐ下の<div>より後に記述すると電話番号は出てくるようになったのですが、レイアウトが崩れてしまうためできればこの場所に置いておきたいです。
よろしくお願いします。
あなたの回答
tips
プレビュー