我想要么我今天很笨,要么就是因为这个项目而盲目工作,但我一直在试图修复一个新的短代码导致的一个小错误。
这是代码
<?php function reviewslide_function() {
$output .= \'
<!-- Review Injection -->
<div id="reviews" class="p-full">
<div class="section_head">
<span class="eyebrow">You about us</span>
<h2>Customer Reviews</h2>
</div>
<div class="stars">
<span class="material-icons">grade</span>
<span class="material-icons">grade</span>
<span class="material-icons">grade</span>
<span class="material-icons">grade</span>
<span class="material-icons">grade</span>
</div>
<div id="reviewbox">\';
$args = array(
\'post_type\' => \'review\',
\'posts_per_page\' => 5,
\'order\' => \'DESC\',
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$output .= \'
<div class="review">\'.
the_content().
\'<span class="review_author">\'.
bewerter_get_meta( "bewerter_name" ).
\'</span></div>\';
enwhile;
$output .= \'
</div>
<script>jQuery("#reviewbox > div:gt(0)").hide();
setInterval(function() {
jQuery("#reviewbox > div:first")
.fadeOut(1800)
.next()
.fadeIn(2000)
.end()
.appendTo("#reviewbox");
}, 6000);
</script>
<div class="reviewbtn btn btn_blue arrow_r nosmooth">
<a href="~GOOGLEREVIEWLINK~" target="_blank"><span>All Reviews</span></a>
</div>
</div>
<!-- Review Exit -->\';
return $output;
}
add_shortcode(\'reviews\', \'reviewslide_function\'); ?>
这是向我抛出的错误:
Parse error: syntax error, unexpected \'}\' in /html/wordpress-dev/wp-content/plugins/cpt-review/index.php on line 187
我正在疯狂地试图修复这个问题,我似乎无法在这里找到错误。