[wp-hackers] Custom taxonomy archive page
Simon Vart
simon.vart at exigences.biz
Tue Apr 30 09:09:58 UTC 2013
Hello,
You shouldn't have to. Did you flush the rewrite rules by validating the
permalink setup page ?
--
---------------------
Simon Vart
studio de communication exigences
10 Rue Amiral Ronarch
29660 Carantec
----
02.98.67.92.70
06.09.97.82.91
www.exigences.biz
linkedin : http://www.linkedin.com/profile/view?id=87258047
twitter : @simonvart
skype: carantecinfo
---------------------
Le 30/04/2013 10:08, Lox a écrit :
> Hello,
>
> I have registred a custom taxonomy for a custom post_type. The taxonomy UI
> shows properly for that custom post_type in wp-admin and I can assign posts
> to it.
>
> When I try to access a taxonomy's archive page (using the display link in
> the taxonomy UI in wp-admin), it is always a 404 page.
>
> I looked a bit and here is the query generated:
>
> SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN
> wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
> WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (13) ) AND
> wp_posts.post_type IN ('post', 'page', 'attachment') AND
> (wp_posts.post_status = 'publish' OR wp_posts.post_author = 1 AND
> wp_posts.post_status = 'private') GROUP BY wp_posts.ID ORDER BY
> wp_posts.post_date DESC LIMIT 0, 10
>
> So the part giving me trouble seems to be:
>
> AND wp_posts.post_type IN ('post', 'page', 'attachment')
>
> Why does WP restrict to those post_type whereas my taxonomy is allocated
> only to my custom post type?
>
> Should I hack the query using filters?
>
> Regards.
>
More information about the wp-hackers
mailing list