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

質問編集履歴

1

該当していると思うコードを載せました。

2021/01/12 12:03

投稿

gg_
gg_

スコア1

title CHANGED
File without changes
body CHANGED
@@ -7,4 +7,105 @@
7
7
  どうすればいいのでしょうか?
8
8
 
9
9
  ちなみに、私はプログラミングを始めたばかりで学んだものもHTML,CSSのみなのでPHPやJavascript,jQueryは全く分かりません。
10
- 何を載せればいいのかも全く検討がつかないので、必要なコードがありましたら返信にてお知らせください。
10
+ 何を載せればいいのかも全く検討がつかないので、必要なコードがありましたら返信にてお知らせください。
11
+
12
+ ※追記
13
+ 「必要なコードを載せて欲しい」と返信をいただいたので、該当しそうなコードを載せます。
14
+
15
+ ```PHP
16
+ <?php
17
+ /**
18
+ * The Header for our theme.
19
+ *
20
+ *
21
+ * @package Adagio Lite
22
+ */
23
+ ?>
24
+ <!DOCTYPE html>
25
+ <html class="no-js" <?php language_attributes(); ?>>
26
+ <head>
27
+ <meta charset="<?php bloginfo( 'charset' ); ?>">
28
+ <meta name="viewport" content="width=device-width, initial-scale = 1.0, maximum-scale=2.0, user-scalable=yes" />
29
+ <link rel="profile" href="http://gmpg.org/xfn/11">
30
+ <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
31
+ <?php wp_head(); ?>
32
+ </head>
33
+
34
+ <body <?php body_class(); ?>>
35
+ <div id="container">
36
+ <?php if ( is_front_page ()) : ?>
37
+ <div class="slogan">
38
+ <h2 class="site-description"> <span>
39
+ <?php bloginfo( 'description' ); ?>
40
+ </span> </h2>
41
+ </div>
42
+ <div id="line-arrow"></div>
43
+ <?php if ( has_nav_menu( 'social' ) ) {
44
+ wp_nav_menu(
45
+ array(
46
+ 'theme_location' => 'social',
47
+ 'container' => 'div',
48
+ 'container_id' => 'menu-social',
49
+ 'container_class' => 'top-social-menu',
50
+ 'menu_id' => 'menu-social-items',
51
+ 'menu_class' => 'menu-items',
52
+ 'depth' => 1,
53
+ 'link_before' => '<span class="screen-reader-text">',
54
+ 'link_after' => '</span>',
55
+ 'fallback_cb' => '',
56
+ )
57
+ );
58
+ } ?>
59
+ <?php endif ?>
60
+ <div id="header">
61
+ <div id="headerin">
62
+ <div id="headerline">
63
+ <div id="logo">
64
+ <?php the_custom_logo(); ?>
65
+ <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
66
+ <h1 class="site-title">
67
+ <?php bloginfo( 'name' ); ?>
68
+ </h1>
69
+ </a> </div>
70
+ <?php if ( has_nav_menu( 'main-menu' ) || has_nav_menu( 'secondary-menu' ) || is_active_sidebar( 'sidebar-1' ) ) : ?>
71
+ <div class="menu-button"> <a class="btn-open" href="#a">
72
+ <div class="bar1"></div>
73
+ <div class="bar2"></div>
74
+ <div class="bar3"></div>
75
+ </a> </div>
76
+ <div class="overlay">
77
+ <div class="inner-overlay">
78
+ <?php if ( has_nav_menu( 'main-menu' ) ) {
79
+ wp_nav_menu(
80
+ array(
81
+ 'theme_location' => 'main-menu',
82
+ 'container_class' => 'mainmenu',
83
+ 'menu_class' => '',
84
+ 'fallback_cb' => false
85
+ )
86
+ );
87
+ } ?>
88
+ <?php if ( has_nav_menu( 'secondary-menu' ) ) {
89
+ wp_nav_menu(
90
+ array(
91
+ 'theme_location' => 'secondary-menu',
92
+ 'container_class' => 'secondary-menu',
93
+ 'menu_class' => '',
94
+ 'fallback_cb' => false
95
+ )
96
+ );
97
+ } ?>
98
+ <?php get_sidebar(); ?>
99
+ </div>
100
+ </div>
101
+ <?php endif ?>
102
+ </div>
103
+ </div>
104
+ </div>
105
+ <div id="wrapper">
106
+ <?php if (is_front_page() && ( has_header_image() || is_active_sidebar( 'sidebar-2' ) )) {
107
+ get_template_part( 'topsection' );
108
+ } ?>
109
+
110
+ ```
111
+ ヘッダーの部分で困っているので、該当していると思った”header.php”を載せました。