php - get_terms pagination

Anyone know how to paginate this get_terms function in wordpress, I tried some options but nothing worked, perhaps its b

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

相关推荐

  • php - get_terms pagination

    Anyone know how to paginate this get_terms function in wordpress, I tried some options but nothing worked, perhaps its b

    6小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信