Wordpress custom post_type templates
Posted
by roman
on Stack Overflow
See other posts from Stack Overflow
or by roman
Published on 2010-02-10T15:17:59Z
Indexed on
2010/05/04
1:08 UTC
Read the original article
Hit count: 268
Wordpress
|custom-post-tags
We are currently working on a Wordpress page that reuses data from another Application. To keep things clean, but still use most wordpress features, we decided to use custom post_type settings (register_post_type) for this data.
Now the Problem is, that while accessing these Posts is no problem, the Permalink's to them fail with 404's.
We currently work around this issue by adding an action to the "template_redirect" hook that essentially performs a query_posts for the name and our custom types. If query_posts found something we load our custom post templates with locate_template.
Although this is working, it does not look like a clean solution - can anyone here propose a better way to tackle our problems?
© Stack Overflow or respective owner