• 0
Sign in to follow this  
Followers 0

Categories are broken

Question

Posted · Report post

I just noticed something really weird going on with my categories. Today I followed one of my category links and was surprised to find the page was totally empty. It's strange. The categories appear to be working. They appear in my categories list, and correctly indicate the number of posts in each category. But none showed up on the categories page. Here's where it gets even stranger. I took a trip to my permalink settings and hit the save button. I didn't make any changes. I just hit the save settings button. And now my categories links are doing exactly the opposite thing. I go to to a particular category page and instead of displaying only the posts from that category, every single post is displayed. Any ideas?

Share this post


Link to post
Share on other sites

17 answers to this question

  • 0

Posted · Report post

Have you already tried deactivating your plugins?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Deactivated every plugin . . . no dice. Though it did give one hint. The plugin that I suspected might be the problem is one called Easy Custom Content Types, which can be used to create and manage custom post types, custom taxonomies, and meta boxes. Disabling that plugin and that made the categories pages empty again (like they were before I clicked "save settings" on the permalink settings page. So, I can't really be sure that Easy Custom Content Types is the culprit--disabling the plugin doesn't solve my problem--but it does have some effect on my categories pages. On the other hand, all of my custom post types are associated with that plugin, and all of my posts are custom post types. So maybe it makes sense that all my content would disappear from the pages with that plugin deactivated, since the custom post types disappear when the plugin is not active (and reappear when it is reactivated).

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Can you please post a link to your site?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks for your help. My site is: http://bestkidipadapps.com Here's a link to the Sesame category, which should have only one post in it: http://bestkidipadapps.com/category/sesame/ And here's a screenshot of my categories list, which correctly reports that the Sesame category should only contain a single post: [IMG]http://i55.photobucket.com/albums/g134/shmokes/CategoriesList.png[/IMG]

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Were the categories and their posts working fine when you first created them? Were there any other changes made recently? Any upgrade?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Yeah, they were definitely working. I tested every single one just after making it (because I visited them to copy the url for a link I put in a table here: http://bestkidipadapps.com/ipad-book-app-reviews). The only changes that I can think of making are a metric ton of code I added to the functions.php in Base to make custom posts show up in the main loop and to make custom templates for my custom posts. But I commented all that out just now and it didn't make a difference. The only other change I can think of, which doesn't immediately strike me as relevant, is that I recently installed the plugin [url=http://www.blogtrafficexchange.com/wordpress-backup/]WordPress Backup (Blog Traffic Exchange)[/url], which worked initially, but shortly after I installed it I noticed that my time zone was set to some place in Europe (I'm in Chicago), so my WordPress time was way wrong. Immediately after fixing the time, that Backup plugin stopped working, giving me an "Error 500 - Internal Server Error" message. To me that doesn't seem likely to be related, but it is at least something else that is currently not functioning properly. I emailed the plugin author and just figured I'd uninstall the plugin and use something else if I didn't hear back.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

What happens when you click the save settings button in the permalink settings again? Does it revert back to the opposite?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Upon further experimentation I think I'm getting a bit closer to identifying the problem. All of my posts were initially made using the default "post" post type. I have since created custom post types, so I got a plugin called [url=http://wordpress.org/extend/plugins/post-type-switcher/]"Post Type Switcher"[/url], with which I changed the post type of all my "posts" to the custom post type "books". Strangely, although in the admin screen all the appropriate category checkboxes are checked, and the categories list correctly reports the number of posts in each category, the post archive showed up as empty. Disabling the plugin had no effect, because the plugin just changes the 'post_type' property of the post (which, remains changed regardless of whether the plugin is activated or deactivated). I used the plugin to change the post type of some of my books back to the default "post" post type, and that made the categories archives work properly again for those items. So I installed another plugin called [url=http://wordpress.org/extend/plugins/post-type-convertr/]Post Type Convertr[/url] to change all of my post types back to "post" and that cured everything. Well, cured everything except that I need them to be "Books", not "Posts". Converting them back into "Books" reintroduced the bad behavior. I'm not really sure what the problem is, but I'm kind of hoping this info will make a lightbulb light up in someone's head who knows more about the inner-workings of WordPress and Platform.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hm, I'm not sure what could be the issue, but I'll flag for developer's attention so they can look over this post and see if they have any insight.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thanks catrina. I'll keep my fingers crossed. I've also emailed the developer of the plugin and just a few minutes ago sent him admin access to my site, so hopefully that will produce some answers. If so I'll post them here for reference.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Do you have 'has_archive' enabled for your custom post types? To my knowledge, custom post types don't have the 'category' taxonomy attached to them by default.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

'has_archive' is enabled. You're right about the category taxonomy not being attached by default. I followed these directions in the plugin documentation to enable the 'category' taxonomy for my custom post types: [quote] [b]Adding Default Category and Post Tags to Custom Post Types[/b] To enable the default Category and / or Post Tags on a custom post type all you need to do is create a new custom taxonomy with the same name as the default taxonomies. So, for example, if you wanted to add the default categories to your Books post type, you would first create a new custom taxonomy named "category", then attach it to the Books post type. If you wanted to add the default Post Tags to your Books post type, you would create a new custom taxonomy called "post_tag", then attach it to the Books post type. Note: the taxonomy labels can be anything you want, but the taxonomy names must be "category" and "post_tag". If you change either of the names, they will not work. Once you have created the new taxonomies, all already created categories and tags will be available for your custom post type. [/quote] This worked, at least in terms of making the categories box, with all my previously made categories, appear in the sidebar of the edit screen for my custom posts.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Can you use a custom taxonomy instead of 'category'? Or use tags?

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Presumably yes, but that leaves a bad taste in my mouth. It means something is broken on my site and I don't know why. More importantly, it most likely means that something [i]I did[/i] broke my site and I don't know what that is to avoid it in the future. It could also be that what I'm seeing now is only a symptom of a much larger problem and taking care of it now would be far easier than taking care of it when I'm forced to sometime in the future. In short, if I have to I will just resign myself to the fact that my site is broken and there's nothing I can do about it. But that is a solution that I would like to avoid if at all possible.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I've had great success with Platform and CustomPress to create custom taxonomies. Works perfectly.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

I verified that the plugin was the culprit. For what it's worth, though, after I brought the issue to the author's attention he patched the plugin and it seems to work correctly now.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Many plugin authors don't update all the time when WP updates.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0