As noted in the comments the issue here is that the sidebar was calling the_category()
, which displays only the current category, rather than listing all categories.
An even more “WP way” approach is to make the sidebar dynamic. That way, you can use widgets rather than hard-coding what appears in the sidebar. WP has a number of built-in widgets, including a category list, so you don’t have to code it yourself.
Related Posts:
- How to create a widgetized sidebar for every category dynamically?
- Display all posts with same title
- Categories and Tags returning 404 on the sidebar when using ugly permalinks
- show posts names and links in the sidebar list as categories child
- Add Icons to the Product Category Sidebar Widget WooCommerce
- Custom sidebar on category pages
- Display category-specific comments in sidebar
- How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?
- Tags Instead of Category
- How to only show parent categories in sidebar
- Show Secondary Sidebar on Category pages (archive)
- sidebar troubles, taxonomy trouble
- Excluding current category from sidebar’s post widget, elementor, query-id
- Custom sidebar isn’t showing up on sub-category posts
- How do I get conditional sidebars for specific category archives and posts
- How to edit woocommerce sub-category page
- Sidebar by Category Conditional Statement not functioning
- Print categories and most viewed articles
- Loop doesn’t work
- Automatic menu creation for pages with categories?
- Sidebar Categories change arrow when subcategories are shown on click
- Archives and category of authors
- How to add the sidebar in all category page
- Display different sidebar based on search results from one category
- Get all categories and posts in those categories
- Combine two taxonomies in a hierarchical tree
- Get current category details the user is currently on in category.php
- Get Default Post Category From Settings
- Get the number of posts in a named category, outside the loop
- Test if post has a category
- Categories – create a new separate set right after the default?
- I want to order categories based upon the latest post time
- Highlight current category in wp_list_categories
- How to find all posts without category and assign the “Uncategorized”?
- How to Override default update_count_callback for category
- How to select product category while adding new product in woocommerce? [closed]
- WordPress previous_post_link exclude posts with multiple categories
- Is it possible to put tags and category information in the post as text?
- How do I count how many top level categories there are?
- Is it possible to post with Word 2007 via XML-RPC and limit categories by user?
- how to get the categories for a single post in a hierarchical way
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- Getting categories id for all products in cart
- Is there a cleaner way to get post count for a category in category.php?
- Show archives by year from just one category
- Combining post categories and link categories?
- Category being displayed without base parmalink
- wordpress sub-category ( lowercase letters + non-latin characters ) = 404
- Customize WordPress widget – Product Category
- Display categories with child category separated by letter
- How to make the link to the category for a post go to corresponding page number in archive?
- How to build a simple nav system of custom post type categories and its posts?
- Shortcode interpreted as text
- scaleability of tags
- Is there a way to only show Custom Meta Data on single posts from certain catagories
- Grouping post-types in loop
- display a widget on specific category and its sub categories
- So my theme doesn’t have a category.php file
- Custom page category taxonomy 404
- Template hierarchy: how to let category.php conditionally-load archive.php?
- Getting Category Children
- Break down output of wp_list_categories
- Get the ID of the current post’s child category
- Assign a custom post to a custom taxonomy based on custom field value
- How can i show categories of custom post
- Posts of specific category on page and excluded from index.htm
- How can assign posting to Subscriber to specific category?
- Include specific category in URL automatically
- WordPress Category Page Layout
- remove url from categories
- how to style show_count in wp_list_categories()
- It is possible to display related posts from same category as the current post?
- Page category filter in admin dashboard
- Remove WP Core canonical for category pagination
- Create categories manually in database
- how to display specific Category if post have more one Category?
- Is there a way to fetch the category of a page when using wp_list_pages?
- How to fix 404 error in pagination in categories of woocommerce with common url base /shop/?
- Hide specific category link from showing
- How to delete WooCommerce categories in bulk that only have one product
- Product Category page showing all products
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- Display List of Categories Within a Custom Taxonomy
- How to remove specific categories from tag archives?
- add custom option to get_categories dropdown
- How can I allow people to ‘subscribe’ to categories?
- get_category_parents displays an empty category
- Why is my post categories not displaying?
- Sort categories by meta value
- Unassign uncategorized from post with 2 or more categories
- Printing out Main Category ID’s in a Loop
- Getting lots of errors with sitemap on google webmasters
- Categories as selectable links on submission form
- How can i hide the authors box from a specific set of categories and post types?
- Displaying categories and subcategories without link
- Replace the post count on wp_list_categories with “Has Posts” instead of number and “No Posts” if none
- How to load/include category templates based on conditionals?
- Why does WordPress append a bullet to my category tag?
- how to implement next/prev within category archive?
- Restricted category in Woocommerce [closed]