質問するログイン新規登録

質問編集履歴

1

内容を追記しました。

2021/09/01 12:16

投稿

aya.h
aya.h

スコア1

title CHANGED
@@ -1,1 +1,1 @@
1
- Wordpress『Sydney Child』テーマ使用。モバイル表示メニューバーが作動しな
1
+ Wordpress『Sydney Child』テーマ使用。モバイル表示でヘッターメニューバーが作動しなくなった
body CHANGED
@@ -1,15 +1,124 @@
1
1
  Wordpress『Sydney Child』テーマ使用しています。
2
- モバイル・タブレット表示時にTOPページのメニューバーが動かなくなりました。
2
+ モバイル・タブレット表示時にTOPページのヘッターメニューバーが動かなくなりました。
3
-
4
3
  作成時は正常に作動していましたが、現在は作動しません。
5
- 三本線のメニューアイコンは表示されています。)
4
+ 三本線のメニューアイコンは表示されています。)
6
-
7
- *試したこと*
8
- PCページでは通常通りのメニュー表示ができており、
5
+ PCページでは通常通りのメニュー表示ができており、
9
6
  モバイルでもURLの直接入力をすれば、ページ内は正常に見れます。
10
7
  メニューバーのみ作動しない状態です。
11
8
 
9
+ インターネット検索で色々と調べてみましたが、解決しませんでした。
10
+
12
- コードが壊れている可能性がありますが、どの部分が原因なのかがわかりません。
11
+ コードが壊れている可能性がありますが、Wordpress、プログラミング初心者の為、どの部分が原因なのかがわかりません。
13
12
  ご教示いただけますでしょうか?
14
13
 
14
+
15
+ ```functions.php
16
+ <?php
17
+ // Exit if accessed directly
18
+ if ( !defined( 'ABSPATH' ) ) exit;
19
+
20
+ // BEGIN ENQUEUE PARENT ACTION
21
+ // AUTO GENERATED - Do not modify or remove comment markers above or below:
22
+
23
+ if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
24
+ function chld_thm_cfg_locale_css( $uri ){
25
+ if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
26
+ $uri = get_template_directory_uri() . '/rtl.css';
27
+ return $uri;
28
+ }
29
+ endif;
30
+ add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
31
+
32
+ if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
33
+ function chld_thm_cfg_parent_css() {
34
+ wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'sydney-bootstrap' ) );
35
+ }
36
+ endif;
37
+ add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );
38
+
39
+ // END ENQUEUE PARENT ACTION
40
+
41
+ ```
42
+
43
+ ヘッターPHP
44
+ ```header.php
45
+ <?php
46
+ /**
47
+ * The header for our theme.
48
+ *
49
+ * Displays all of the <head> section and everything up till <div id="content">
50
+ *
51
+ * @package Sydney
52
+ */
53
+ ?><!DOCTYPE html>
54
+ <html <?php language_attributes(); ?>>
55
+ <head>
56
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
57
+ <meta name="viewport" content="width=device-width, initial-scale=1">
58
+ <link rel="profile" href="http://gmpg.org/xfn/11">
59
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
60
+ <?php if ( ! function_exists( 'has_site_icon' ) || ! has_site_icon() ) : ?>
61
+ <?php if ( get_theme_mod('site_favicon') ) : ?>
62
+ <link rel="shortcut icon" href="<?php echo esc_url(get_theme_mod('site_favicon')); ?>" />
63
+ <?php endif; ?>
64
+ <?php endif; ?>
65
+
66
+ <?php wp_head(); ?>
67
+ </head>
68
+
69
+ <body <?php body_class(); ?>>
70
+
71
+ <?php do_action('sydney_before_site'); //Hooked: sydney_preloader() ?>
72
+
73
+ <div id="page" class="hfeed site">
74
+ <a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'sydney' ); ?></a>
75
+
76
+ <?php do_action('sydney_before_header'); //Hooked: sydney_header_clone() ?>
77
+
78
+ <header id="masthead" class="site-header" role="banner">
79
+ <div class="header-wrap">
80
+ <div class="container">
81
+ <div class="row">
82
+ <div class="col-md-4 col-sm-8 col-xs-10">
83
+ <?php if ( get_theme_mod('site_logo') ) : ?>
84
+ <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php bloginfo('name'); ?>"><img class="site-logo" src="<?php echo esc_url(get_theme_mod('site_logo')); ?>" alt="<?php bloginfo('name'); ?>" /></a>
85
+ <?php if ( is_home() && !is_front_page() ) : ?>
86
+ <h1 class="site-title screen-reader-text"><?php bloginfo( 'name' ); ?></h1>
87
+ <?php endif; ?>
88
+ <?php else : ?>
89
+ <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
90
+ <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
91
+ <?php endif; ?>
92
+ </div>
93
+ <div class="col-md-8 col-sm-4 col-xs-2">
94
+ <div class="btn-menu"><i class="sydney-svg-icon"><?php sydney_get_svg_icon( 'icon-menu', true ); ?></i></div>
95
+ <nav id="mainnav" class="mainnav" role="navigation">
96
+ <?php wp_nav_menu( array( 'theme_location' => 'primary', 'fallback_cb' => 'sydney_menu_fallback' ) ); ?>
97
+ </nav><!-- #site-navigation -->
98
+ </div>
99
+ </div>
100
+ </div>
101
+ </div>
102
+ </header><!-- #masthead -->
103
+
104
+ <?php do_action('sydney_after_header'); ?>
105
+
106
+ <div class="sydney-hero-area">
107
+ <?php sydney_slider_template(); ?>
108
+ <div class="header-image">
109
+ <?php sydney_header_overlay(); ?>
110
+ <img class="header-inner" src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" alt="<?php bloginfo('name'); ?>" title="<?php bloginfo('name'); ?>">
111
+ </div>
112
+ <?php sydney_header_video(); ?>
113
+
114
+ <?php do_action('sydney_inside_hero'); ?>
115
+ </div>
116
+
117
+ <?php do_action('sydney_after_hero'); ?>
118
+
119
+ <div id="content" class="page-wrap">
120
+ <div class="container content-wrapper">
121
+ <div class="row">
122
+ ```
123
+
15
124
  宜しくお願い致します。