Anyone know how to paginate this get_terms function in wordpress, I tried some options but nothing worked, perhaps its because of the label?
<div class="comp-modal-content">
</ul> <form action="" method="post">
<?php
$args = array('hide_empty' => false,
'orderby' => 'id');
$terms = get_terms( 'compliment', $args );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
echo '<ul class="comp-user-ul">';
$count = 0;
foreach ( $terms as $term ) {
$count++;
$t_id = $term->term_id;
$term_meta = get_option( "taxonomy_$t_id" );
?>
<label>
<input type="radio" name="term_id" value="<?php echo $term->term_id; ?>" <?php if ($count == 1) { echo 'checked="checked"'; } ?>>
<span>
<img style="height: 50px; width: 50px; vertical-align:middle" src='<?php echo esc_attr( $term_meta['compliments_icon'] ) ? esc_attr( $term_meta['compliments_icon'] ) : ''; ?>' class='preview-upload'/>
</span>
</label>
<?php
}
echo '</ul>';
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745143253a4613525.html
评论列表(0条)