Working with get_terms
-
Hi,
I’m using the get_terms function to display the terms images, I can’t seem to work a way to display the pagination of them,
Here is my code, the pagination appears but when I go to another page it just displays the same posts without offsetting them
`<article class=”inner-content”>
<?php the_field(text’, ‘option’); ?>
<ul class=”list”>
<?php
$paged = ( get_query_var( ‘paged’ ) ) ? get_query_var( ‘paged’ ) : 1;
$args = array(
‘taxonomy’ => ‘issues’,
‘term_args’ => array
( ‘hide_empty’ => true
),
‘paged’ => $paged
);$terms = apply_filters( ‘taxonomy-images-get-terms’, ”, $args);
foreach( (array) $terms as $term) {
echo ‘- ‘;
echo ‘name ) . ‘” ‘ . ‘>’ . wp_get_attachment_image( $term->image_id, ‘issue’ ) . ” . $term->name . ‘‘;
echo ‘
‘;
}?>
<?php wp_pagenavi(); ?>
</article>
- ‘;
The topic ‘Working with get_terms’ is closed to new replies.