0

I have Taxonomy with name states and term in that taxonomy California http://crowdupdating.jelingu.com/states/california/page/2/ this is how my pagination link looks the pagination code is in taxonomy-states.php Am getting taxonomy terms with the permalink and then click on that taxonomy on the other page am getting posts related to that taxonomy everhitngs working fine but pagination creating an issue here is working example http://crowdupdating.jelingu.com/states/california/

this is the pagination that I use: https://kriesi.at/archives/how-to-build-a-wordpress-post-pagination-without-plugin

/*********************** here is my code***********
$term = get_queried_object();
$paged = get_query_var('paged') ? get_query_var('paged', 1) : get_query_var('page', 1);
$args = array(
    'post_type' => 'clinics',
    'order' => 'ASC',
    'tax_query' => array(
        array(
            'taxonomy' => 'states',
            'field' => $term->slug, //can be set to ID
            'terms' => $term->term_id //if field is ID you can reference by cat/term number
        )
    ),
    'posts_per_page' => 1,
    'paged' => $paged

);
<?php addiction_pagination($the_query->max_num_pages);?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.