php初心者です。
content/work/sample-work1/
を見るようになっているのを
↓
content/yyyy/mm/dd/news01/
を見れるよう変更したいです。
その場合、どこをどう直せばよいのでしょうか。
<?php
$options = get_design_plus_option();
$show_category = $options[ 'show_work_list_category' ];
$query = new WP_Query('post_type=work&posts_per_page=9');
if ( $query->have_posts() ):
?>
<div class="information">
<h2 class="en">INFORMATION</h2>
<ul>
<?php
$counter = 1;
while ( $query->have_posts() ): $query->the_post();
// サムネイル画像の取得
if ( has_post_thumbnail() ) {
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'size1' );
} elseif( $options[ 'no_image2' ] ) {
$image = wp_get_attachment_image_src( $options['no_image1'], 'full' );
} else {
$image = array();
$image[0] = esc_url( get_bloginfo('template_url') ) . "/img/common/no_image1.gif";
}
?>
<?php
// 4つ目以上の場合は、sp_noneクラスを付与
if ( $counter > 3 ):
?>
<li class="sp_none">
<?php else: ?>
<li>
<?php endif; ?>
<a href="<?php the_permalink(); ?>">
<figure>
<?php
// カテゴリを取得表示
if ( $show_category ):
$area_category = get_the_terms( $post->ID, 'area' );
if ( $area_category && !is_wp_error( $area_category ) ):
?>
<time class="en"><?php echo esc_html( $area_category[ 0 ]->name ); ?></time>
<?php
endif;
endif;
?>
<img src="<?php echo esc_attr( $image[0] ); ?>" alt="">
<figcaption><?php the_title(); ?></figcaption>
</figure>
</a>
</li>
<?php
$counter++;
endwhile;
?>
</ul>
<div class="btn en"><a class="block" href="./content/information/">MORE</a></div>
</div>
<?php
wp_reset_postdata();
endif;
?>