Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom taxonomy: 'tipo_busco' with two values: 'girls' and 'boys'.

I have a template: taxonomy-tipo_busco.php

If I go to: www.mydomain.com/tipo_busco/girls it shows the posts with that taxonomy. Ok. But I cant paginate it.

Im using:

<?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?>
<?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>

The link goes to: www.mydomain.com/tipo_busco/girls/page/2 and it shows a 404 error.

This is the queryposts:

<?php query_posts(array( 'post_type'=>'busco', 'showposts' => 1, 'paged' => $paged, 'tipo_busco'=>$term->slug));  ?>

If I set the "number of entries" to 1, it works, but if I set to 10, it shows the 404 error page... :(

How can I fix it ?

Thanks!

share|improve this question

closed as too localized by toscho Jul 16 '12 at 23:08

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Use this in your functions.php:

add_action( 'parse_query','changept' );
function changept() {
    if( is_category() && !is_admin() )
        set_query_var( 'post_type', array( 'post', 'your_custom_type' ) );
    return;
}
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.