Custom Content Types and WordPress Default Categories
-
Hi,
I’ve created custom content types and have one final issue to resolve. Instead of custom taxonomies (or none) for my custom content types, I’m using the native default WordPress categories.
The problem is that the category archive pages do not display content and pull from the index.php template instead of category.php template. However, when I use default permalinks, the category.php template is used but the content displayed is the no results apologies content.
To get default categories to display on my custom content forms, I had to use some code fu culled from someone’s site. I’ve put the code into Pastebin here:
In addition, I’m using the 2010 theme with no changes to the category.php template or category-related code in loop.php.
The problem feels like a URL rewrite issue (the rewrite process doesn’t include the custom content types and, therefore, returns a null data set?) and/or a query issue (the page query doesn’t include my custom content types?). However, when I create a standard Post type and tag it with a category, the category archive page displays all Post content (e.g. my test content and Hello World content).
Can someone look over my code and suggest possible solutions to allow content categories to display?
- The topic ‘Custom Content Types and WordPress Default Categories’ is closed to new replies.