Viewing 1 replies (of 1 total)
  • Thread Starter keramiart

    (@keramiart)

    Okay, I know this is quite rudimentary, but I did something like this:

    $tax_query = array(
       array(
          'taxonomy'  => $term->taxonomy,
          'terms'      => $term,
          'field'      => 'slug',
       )
    );
    $args = array(
       'post_type'            => $taxonomy == 'portfolio-tag' || $taxonomy == 'portfolio-category' ? 'portfolios' : 'post',
       'tax_query'              => $tax_query,
       'posts_per_page'      => '20',
       'post_status'         => 'publish',
       'paged'               => $paged,
    );
    
    $wp_query = NULL; $wp_query = new WP_Query( $args );
    
    $pages = $wp_query->max_num_pages;
    $range = 2;
    
     for ( $i = $range; $i <= $pages; $i++) {
       $gsg->AddUrl(get_term_link($term, $term->taxonomy) . 'page/' . $i . '/', $term->_mod_date, $gsg->GetOption("cf_tags"), $gsg->GetOption("pr_tags"));
    }

    Works for now. Any suggestions welcome.

Viewing 1 replies (of 1 total)
  • The topic ‘Paged links in Sitemap.xml for taxonomies (including custom ones)?’ is closed to new replies.