遇到一些问题taxonomy images plugin.我试图将页面上显示的分类术语数量限制为6个。下面的代码是我正在使用的代码。它显示术语名称和图像附件。如何限制术语/图像数量的提示?
<?php
$terms = apply_filters( \'taxonomy-images-get-terms\', \'\', array(
\'taxonomy\' => \'technologies\',
) );
if ( ! empty( $terms ) ) {
print "\\n" . \'<div class="row">\';
foreach( (array) $terms as $term ) {
print "\\n" . \'<div class="col-lg-2 col-md-2 col-sm-4 col-xs-6">\';
print "\\n\\t" . wp_get_attachment_image($term->image_id, array(\'600\', \'600\'), "", array("class" => "img-responsive tech-logo" ) );
print "\\n\\t" . \'<h6 class="tech-description text-center">\' . esc_html( $term->name ) . \'</h6>\';
print "\\n" . \'<span class="hidden-lg hidden-md"><br/><br/></span></div>\';
}
print "\\n" . \'</div>\';
}
?>