質問編集履歴
1
追記でarchive\.phpとcontent\.phpを記載いたしました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -106,4 +106,102 @@
|
|
106
106
|
<?php the_terms($post->ID,'websites'); ?>
|
107
107
|
```
|
108
108
|
|
109
|
+
追記-------------------------------------------
|
110
|
+
※テーマは、underscoreをカスタマイズして利用しています。
|
111
|
+
|
112
|
+
```html
|
113
|
+
//archive.php
|
114
|
+
<?php
|
115
|
+
get_header(); ?>
|
116
|
+
|
117
|
+
<div id="primary" class="content-area col-md-8">
|
118
|
+
<main id="main" class="site-main" role="main">
|
119
|
+
|
120
|
+
<?php
|
121
|
+
if ( have_posts() ) : ?>
|
122
|
+
|
123
|
+
<header class="page-header">
|
124
|
+
<?php
|
125
|
+
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
126
|
+
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
127
|
+
?>
|
128
|
+
</header><!-- .page-header -->
|
129
|
+
|
130
|
+
<?php
|
131
|
+
/* Start the Loop */
|
132
|
+
while ( have_posts() ) : the_post();
|
133
|
+
|
134
|
+
/*
|
135
|
+
* Include the Post-Format-specific template for the content.
|
136
|
+
* If you want to override this in a child theme, then include a file
|
137
|
+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
|
138
|
+
*/
|
139
|
+
get_template_part( 'template-parts/content', get_post_format() );
|
140
|
+
|
141
|
+
endwhile;
|
142
|
+
|
143
|
+
the_posts_navigation();
|
144
|
+
|
145
|
+
else :
|
146
|
+
|
147
|
+
get_template_part( 'template-parts/content', 'none' );
|
148
|
+
|
149
|
+
endif; ?>
|
150
|
+
|
151
|
+
</main><!-- #main -->
|
152
|
+
</div><!-- #primary -->
|
153
|
+
|
154
|
+
<?php
|
155
|
+
get_sidebar();
|
156
|
+
get_footer();
|
157
|
+
```
|
158
|
+
|
159
|
+
```html
|
160
|
+
//content.php
|
161
|
+
<?php
|
162
|
+
|
163
|
+
?>
|
164
|
+
|
165
|
+
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
166
|
+
<header class="entry-header">
|
167
|
+
<?php
|
168
|
+
if ( is_single() ) {
|
169
|
+
the_title( '<h1 class="entry-title">', '</h1>' );
|
170
|
+
} else {
|
171
|
+
the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
|
172
|
+
}
|
173
|
+
|
174
|
+
//これが出ない。
|
175
|
+
wp_list_categories('title_li=&taxonomy=websites');
|
176
|
+
|
177
|
+
if ( 'post' === get_post_type() ) : ?>
|
178
|
+
<div class="entry-meta">
|
179
|
+
<?php hogehoge_posted_on(); ?>
|
180
|
+
</div><!-- .entry-meta -->
|
181
|
+
<?php
|
182
|
+
endif; ?>
|
183
|
+
</header><!-- .entry-header -->
|
184
|
+
|
185
|
+
<div class="entry-content">
|
186
|
+
<?php
|
187
|
+
the_content( sprintf(
|
188
|
+
/* translators: %s: Name of current post. */
|
189
|
+
wp_kses( __( 'Continue reading %s <span class="meta-nav">→</span>', 'hogehoge' ), array( 'span' => array( 'class' => array() ) ) ),
|
190
|
+
the_title( '<span class="screen-reader-text">"', '"</span>', false )
|
191
|
+
) );
|
192
|
+
|
193
|
+
wp_link_pages( array(
|
194
|
+
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'hogehoge' ),
|
195
|
+
'after' => '</div>',
|
196
|
+
) );
|
197
|
+
?>
|
198
|
+
</div><!-- .entry-content -->
|
199
|
+
|
200
|
+
<footer class="entry-footer">
|
201
|
+
<?php hogehoge_entry_footer(); ?>
|
202
|
+
</footer><!-- .entry-footer -->
|
203
|
+
</article><!-- #post-## -->
|
204
|
+
|
205
|
+
```
|
206
|
+
|
109
207
|
よろしくお願いいたします。
|