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.
Related Posts:
- WordPress Multisite – global categories
- Get posts from sites in Multisite?
- Multisite – Protect categories from deletion?
- Category page doesn’t use category.php, instead it redirects to homepage
- 5 blogs on one WordPress site
- Multisite blog converting categories to subdomains
- Adding categories to all blogs at once
- WordPress MU 2.9.2 to 3.0.5 changes to category.php
- How to make category RSS feeds show full content
- Multi-site or categories?
- Multisite – create a category in specific site
- WordPress Multisite – global categories
- Default category link for a custom category is a broken link
- Archives for each category on WP Multisite
- How do I share categories across selected sites in a Multisite setup
- wordpress multisite… collect all posts on main blog – exclude category?
- Can Categories be used to hack a Multisite-like setup w/ a single MySql db?
- How to Sync Menu, Widgets and other masters from Main Website to its Sub Site
- Categories show 404 error on multisite installation
- Global navigation in multisite: problem with categories
- Duplicate new categories across multisite network
- get_the_category return empty inside loop
- global categories – Share specific categories in wordpress multisite
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- Using template file for single post in sub-directory multisite
- A search box for all sites – Multisite
- How to create default categories in new installs?
- Multiple parent categories
- How to populate a WordPress install with a lot of categories, quickly?
- How to structure Multisite sites into categories?
- On the category page, get the category object
- Group WP_Query by category
- How to filter categories by custom field?
- get_terms name__like list categories according to letter
- Adding Colorpicker Field To Category
- Add extra fields to Add New Category page
- get_categories returns an array with one category
- Different templates for parent and children categories/taxonomies
- Create a full width responsive header image per page
- How to create tabled index of posts in a certain category
- Remove child products from woocommerce category page [closed]
- Display comments on a comment page without form
- Plural Category Base Slug On Category Archive Page
- WP 3.0.5: Best way to add custom metaboxes for post categories?
- How do I view a feed consisting of posts from multiple categories?
- Marking old posts as no longer relevant
- Unpublish all posts in a category
- Add class to items in wp_list_categories()
- How is the single category page called and how does it know which posts to show?
- Is it possible to select and edit the way the most recent post from a certain category is displayed on the page?
- Problem with wp_create_category
- Archive.php filtered by pre-determined category
- category filter doesn’t work in WPML
- How do you categorize pages?
- Order of subcategories
- “Categories” for six authors [closed]
- category image taxonomy
- Categories overview that links to page displaying posts
- Custom category URL rewriting
- Get Number of total Parent Categories for Custom Taxonomy
- How to change how many list item show in category generated by file edit-tags.php
- How to display numbered pages in a category
- How can I add an “ALL CATEGORIES” entry in wp_dropdown_categories?
- How do I display something on a particular category page?
- Get and show all of the available categories
- how to remove the default title of Categories widget
- Using a rich text editor for category description?
- How to put page numbers with the next/previous on a post/category list?
- Overriding default calendar to show posts from a category
- Categories will only display links to posts
- Adding category dropdown list to theme options page
- How to get posts by category at /%category%/ url?
- Echo text using is_tag
- Cannon see subcategory in permalink
- set terms to category and subcategory
- Custom row actions on a specific category
- How to not display a category post on blog page?
- Show multiple categories in query using redux framework variable
- new WP_Query issues
- Is custom menu name and category name linked in wordpress?
- How to display a block only for a certain category page
- Assignt automatically two categories by author
- WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
- Get multiple category names from permalink
- How to remove an item from a custom Walker_Nav_Menu
- Dynamically display sub-categories on primary menu without adding them
- display number of posts by category Shortcode
- Custom permalink /%category%/%postname%/ produces 404 on each post
- How to display products with multiple conditions, product_id and category_id
- Split posts into 2 separate streams
- Outputting subcategory title AND items on Category page
- Conditions for single post
- Pages, Categories, and working with someone else’s code
- Category articles “read more” links not active
- Custom Fields to Category edit page, then displaying them in a template correctly
- How to create a custom loop ordered by Categories on a Page Template?
- 2 Categories using same template but one has a problem? [closed]
- Make a category my homepage
- WooCommerce Product Search Error
- Post list category plugin alphabetical order [closed]