![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
I have a custom post type named 'community', and I've registered it with taxonomies to include 'category'. I've also added:
PHP Code:
If I add a filter to the query with this code ... PHP Code:
Does anyone have any idea why the register_taxonomy_for_object_type() doesn't accomplish that, forcing me to add the filter? Until I got the function right, it was breaking nav menus, and the admin check was something that became necessary in WP 3.1. If I could avoid adding the filter, I'd really like to do that. |
|
#2
|
||||
|
||||
|
The query on a category archive defaults to post_type=post so you have to define post_type=any or a specific post type.
__________________
Nick "Fred and/or George Weasley" Croft Designs by Nick the Geek @Nick_theGeek on Twitter Make web design easier, get FireBug for FireFox Want to learn more about Genesis? Check out my Genesis Explained Series |
|
#3
|
|||
|
|||
|
I am encountering similar problems with custom post types. Can you elaborate on the process of integrating custom post types with Genesis? I'd love to see some tutorials or a support section dedicated to the topic. I love being able to organize site content with CPTs, but I'm always running onto roadblocks (items excluded from search, archives, etc.)
Thanks!! |
|
#4
|
||||
|
||||
|
Custom post types aren't really intended to organize content, if that is what you are doing then you should be using categories, tags, or possible a taxonomy. They are for different content types, which normally shouldn't be part of the feed, archives ...
For example, many people create a "video" post type. In actuallity they really should have a video taxonomy, this has been added to WordPress 3.1 as a post "format" then things work as they expect because they intend to have "posts" that are "videos", that is to say they want everything to be a post as far as how it is used, but with some special handling because it is a video. This is true for most things that people are trying to use post types for. It is a basic misunderstanding of what a post type is all about. That is why it is hard to find tutorials that demonstrate how to do what you are trying to do with post types, they simply aren't supposed to be used that way and most developers creating tutorials are trying to create "best practices" type tutorials.
__________________
Nick "Fred and/or George Weasley" Croft Designs by Nick the Geek @Nick_theGeek on Twitter Make web design easier, get FireBug for FireFox Want to learn more about Genesis? Check out my Genesis Explained Series |
|
#5
|
|||
|
|||
|
Thanks for the info. I guess part of why I'm attracted to using custom post types in this manner is because they are so segregated through the Wordpress dashboard, etc. I just find it easier to keep my content in good order. Admittedly, there is a lot about the inner-workings of Wordpress that I don't fully understand. I expected that they would behave like regular posts, but allow you to assign different attributes, templates, etc.
Could you recommend a good plug-in that would help me tame my categories and organize my backend better than this method? Thanks! |
|
#6
|
||||
|
||||
|
I'm not aware of a plugin like that, sorry.
__________________
Nick "Fred and/or George Weasley" Croft Designs by Nick the Geek @Nick_theGeek on Twitter Make web design easier, get FireBug for FireFox Want to learn more about Genesis? Check out my Genesis Explained Series |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Should I use 'posts and categories' or 'custom post types'? | joshstauffer | General Discussion | 7 | 10-04-2010 09:11 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us