我使用页面模板以bootstrap手风琴格式显示某个类别的帖子,并在同一页面上回显wordpress gallery插件。问题是我不能让它们一起工作(见下文)。一旦我删除了手风琴,画廊显示哪个让我觉得PHP正在发生冲突?
有人可以帮忙吗?
<?php
/*
Template Name: Corporate client & services
*/?>
<?php get_header(); ?>
<div class="hero-image"> <?php echo the_post_thumbnail(); ?> </div>
<div class="page-title">
<div class="container"> <?php echo get_the_title(); ?> </div>
</div>
<div class="opening-text">
<div class="container">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; else: ?>
<p>
<?php _e('Sorry, this page does not exist.'); ?>
</p>
<?php endif; ?>
</div>
</div>
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
<?php $catquery = new WP_Query( 'cat=15&order=ASC&posts_per_page=10' ); while($catquery->have_posts()) : $catquery->the_post(); ?>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<div class="container">
<a data-toggle="collapse" class="collapsed" data-parent="#accordion" href="#collapse<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne">
<h4 class="panel-title">
<?php the_title(); ?><div class="stock-level"></div>
</h4></a>
</div>
</div>
<div id="collapse<?php echo $i; ?>" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-7 col-md-7 col-lg-7 recycled-image">
<?php echo the_post_thumbnail(); ?>
</div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
<h1><?php the_title(); ?></h1>
<p><?php the_content(); ?></p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php $i++; endwhile; ?>
</div>
</div>
</div>
</div>
<div class="thumbnails">
<div class="container">
<?php if( function_exists( 'easy_image_gallery' ) ) {
echo easy_image_gallery();
}?>
</div>
</div>
<div class="opening-text">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-1 col-md-1 col-lg-1"></div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5 bottom-image"> <?php echo types_render_field("enter-a-image-to-display", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));?> <?php echo types_render_field("enter-a-video-to-display", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));?> </div>
<div class="col-xs-12 col-sm-5 col-md-5 col-lg-5">
<div class="bottom-title"><?php echo types_render_field("enter-title", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));?></div>
<div class="bottom-text"> <?php echo types_render_field("enter-text", array("argument1"=>"value1","argument2"=>"value2","argument2"=>"value2"));?> </div>
</div>
<div class="col-xs-12 col-sm-1 col-md-1 col-lg-1"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>