wordpressのループのコードです。
$sticky = get_option( 'sticky_posts' ); $args = array( 'posts_per_page' => 3, 'post__in' => $sticky, 'post_type' =>'location' ); $query = new WP_Query( $args ); while ( $query->have_posts() ) : $query->the_post(); the_title('<a href="'.esc_url(get_permalink()).'">','</a>'); ?> <?php endwhile; ?> <?php wp_reset_postdata(); ?>
the_title('<a href="'.esc_url(get_permalink()).'">','</a>');
この<a>の間の,ってどういう意味なのでしょうか。適当な文字列かと思ってaとかbにしてみるとエラーが起こります。抜かして
the_title('<a href="'.esc_url(get_permalink()).'"></a>');
こうしてみるとリンクに飛ばなくなります。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/19 13:56
2017/05/19 14:00