- This topic is empty.
-
AuthorPosts
-
September 25, 2010 at 3:09 pm #30358
JasonMediaDecay
MemberI’ve been working on my own theme making heavy use of custom post types and custom taxonomies and there just isn’t a lot of info surrounding their use after creation. For example this is the problem I’ve run into right now. Currently my archive pages will display all posts. So I can click on a term in any taxonomy and I get back every post on my site, even if it doesn’t use that taxonomy. This is the code for my taxonomy.php
query_posts(
array('post_type' => array
('post', 'movie_review', 'tv_review', 'book_review', 'album_review', 'attachment'), 'paged'=>$paged)); ?>
printf( __( 'Posts classified under: %s' ), '' . $term_name . '' );
?>
$term_descrn"; } ?>
" rel="bookmark" title="Permanent Link to ">Movie Review:
Not Found
Sorry, but the requested resource was not found on this site.
Now I had previously thought I had this solved when making my category archives but apparently I didn’t. But at least something is going right there (I think because I’m only calling the custom post type that would fit in that category). To explain I have 2 things in the “Film” category one is a regular post and the other is of the cpt “movie_review”. Now if I click on the “Film” category I get back those 2 posts plus the “Hello World!” post which is under “Uncategorized”. The only reason it’s not returning every single post in this case I believe is that I’m only calling the movie_review post type. This is the code I’m using on my category-film.php:
query_posts(
array('post_type' => array
('post', 'movie_review', 'attachment'), 'paged'=>$paged)); ?>
printf( __( 'Category Archives: %s' ), '' . single_cat_title( 'Film', true ) . '' );
?>
if ( 'movie_review' == $post_type ) { ?>
" rel="bookmark" title="Permanent Link to ">
" rel="bookmark" title="Permanent Link to ">
Sorry, no posts matched your criteria.
What am I doing wrong? I cannot find a solution to this anywhere. If you need to see any other source the site is at http://www.jasonfoulke.com/md2/. It’s just a test setup with test/dummy content right now.
September 27, 2010 at 4:23 pm #78953JasonMediaDecay
MemberAnyone have any idea? I’m still totally stuck on this.
September 28, 2010 at 12:54 am #78969willB
MemberWhat Happens when you do this?
query_posts(
array('post_type' => get_query_var( 'taxonomy' ), 'paged'=>$paged)); ?>
September 28, 2010 at 11:03 am #78977JasonMediaDecay
MemberI get the “no posts” message.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.