1

On the front-end of my WPMU site all categories vanished and every post is marked with "Uncategorised". This is however only on the single.php and not on home.php.

The same error occurs on get_categories(), wp_list_categories() and the_category().

I've tried to look in to the problem with var_dump(get_categories()) but it like WordPress simply thinks that it should be that way.

6
  • Did you try to assign category again from admin panel? Jan 20 '15 at 11:45
  • Yeah I did. Both changing while just having one category assigned and aslo adding multiple categories. But on the front-end it still only says "Uncategorized"
    – Lallex
    Jan 20 '15 at 11:59
  • Did you update your wordpress version recently? OR installed any plugin recently? Jan 20 '15 at 12:02
  • 1
    It seems like wordperss was confused about which blog it was on and pulled the category from another blog post. When i used switch_to_blog(1) (which that page always will be) it worked as it should, thanks anyways!
    – Lallex
    Jan 20 '15 at 12:18
  • Hmm. I see...Okay. Jan 20 '15 at 12:19
0

It seems like there was some kind of problem with my multisite setup which caused WordPress to fetch the categories from some other blogs posts. (Can't really tell where from actually). However by writing switch_to_blog(1) (which it always will be) it seemed to work as it should.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.