0
私はワードプレスのカスタム投稿の最初の投稿に追加のクラスを追加しようとしています。私はテンプレートの部分に次のコードを使用しています。エラーを示しています。最初のワードプレスカスタム投稿にクラスを追加する方法
Parse error: syntax error, unexpected '<' in C:\xampp\htdocs\e24xp\wp-content\themes\e24x\testimonial.php on line 19
<?php
$args = array('post_type' => 'cc_testimonial', 'posts_per_page' => 1, "order" => "DESC");
$query = new WP_Query($args);
$cc = count($query);
if ($query->have_posts()) {
$i=0;
while ($query->have_posts()) {
$query->the_post();
<div class="testimonialitem item <?php echo ($i==0)?'active':''; ?>">//SHOWING ERROR
<div class="testimonial-content">
<p><?php the_title();?></p>
</div>
</div><!--/.testimonialitem-->
$i++;
}
}
wp_reset_query();
wp_reset_postdata();
?>
は、このコードで何が間違っています?
@SBiswasを書き込む前
PHP
を閉じるのを忘れて!あなたは歓迎です、幸せなコーディング – caramba