WordPress uses a hierarchy of templates (see the visual overview) which it checks for presence. In your case when showing a category archive it will check for presence the following files in this order and use the first one it finds:
- category-$slug.php (In your case probably category-news-events.php)
- category-$id.php
- category.php
- archive.php
- [paged.php] if paged
- index.php
So if you want to change things for a specific category, you best create a category-$slug.php
(copy from category.php
). If you want to to modify the general presentation of categories modify category.php
directly. If category.php
is not present, just use the next existing file according to the hierarchy.
Related Posts:
- Different templates for parent and children categories/taxonomies
- is_archive() content being shown instead of is_category()
- Only one post is showing on category page, why?
- Categories overview that links to page displaying posts
- Is it possible to have a template that works on multiple categories where the link address contains the specific category?
- What Must to Display the “mysite.com/category” URL?
- Custom Archive Template for Multiple Categories
- Use different file includes for single.php
- Most efficient way to have 1 template for parent, 1 template for child categories?
- Template files not working for archives and categories
- How to make child categories recognize parent’s template displays
- Different template for subcategories
- Preventing index.php?category_name=something from redirecting
- Make all subcategories use the template of its category parent?
- Display only deepest category on a single post?
- How do I set a specific template for sub-categories?
- Exclude a category from the filed under list only on some templates
- Create single.php for specific category by category id
- Categories Template Assistance
- How to override Category rendering mechanism
- How to control template resolution if both Author and Category filter in place?
- Display only posts from referred category on date archive page
- How do I change the sql query for wp_get_archive()
- Apply custom category template to subcategories
- Custom page for WooCommerce’s /product-category/
- Code to pull in a PHP file named after the category ID
- Exclude category from Tag Template
- How to make a Thumbnails Mosaic
- Are Category or Tag Archive Pages Possible?
- Possible to make a subdirectory that loops through a single category?
- Need Category RSS Feed that shows all posts
- Display Categories, Sub-categories, and Sub-sub-categories on separate pages
- WooCommerce IF statements not working
- WordPress subcategories return 404 in custom template
- Set a them for all subset of category
- Category-slug.php not being used
- How to display only posts assigned to a particular, isolated, subcategory
- Highlight wp_nav_menu when category is selected
- Archive.php filtered by pre-determined category
- Different templates for different category tags
- How to show single category archive
- Restoring default article pagination on archives – Removing custom limits
- The default code for “posts_nav_link” on category.php isn’t working
- Updating category template to change how subcategories display
- Category template to show different categories based on parent
- Does “show_option_all” in wp_list_categories do anything?
- How can I improve this taxonomy treating approach?
- Sub category templates
- Custom taxonomy template for categories
- How to insert category list into post creation page, and retrieve chosen categories?
- Limit number of posts on a custom category template – breaking pagination
- Use meta boxes inside an archive page template for Woocommerce
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- How to get posts by category at /%category%/ url?
- Image loading function not working on archive.php template
- Custom template for sub-sub-categories
- Template hierarchy: how to let category.php conditionally-load archive.php?
- How to use wp_list_categories with plugin category?
- Using if statement in index.php instead of creating separate template files
- Why is my sub-category template showing the wrong posts
- Template for product-category page [closed]
- Add Date & Author Meta to Category Archive Page
- Display subcategories selectbox on each category page
- Displaying year once in category.php [duplicate]
- I would like to feature a tip on the homepage
- How to differentiate the homepage structure from the category page structure in WordPress template?
- How can I include custom category and tag base in template files?
- Different header for each category
- Category Template – Show Last Entry as Featured
- Custom post type archive category page results in 404
- Include home page template in specific category template
- Output Title of Post’s Current Category
- Showing different posts on category pages
- Displaying categories in different template problem
- Include last post date in get_categories loop
- Is it possible to set archive.php instead of index.php to display blog?
- How to list posts from a sub-category that is listed in a parent category (more details below)?
- BuddyPress : how can I call the template WordPress would have chosen (template hierarchy)?
- Category custom template is not showing correct posts
- Adding a category view to a page
- Using a template page parent breaks page
- Different template for subcategories
- the_content() not showing full posts in category template
- Display Taxonomies in loop with template args
- Choosing different templates for categories
- Show posts from all categories
- Getting page/category content to show up in my custom page template
- Page Templates Used in Custom Post Type
- Category Templates for Post Types not Working
- One category not displaying template updates
- Categories to A News Page
- WordPress a template for subcategories fo a given category, but not for root category
- How do I get a single page navigation depending on the previous page?
- Add 1 category more to If_in_category statement
- Custom Fields to Category edit page, then displaying them in a template correctly
- Category Template – to be editable from the backend?
- 2 Categories using same template but one has a problem? [closed]
- have_posts is empty on category.php
- How to create a template for categories
- How to load/include category templates based on conditionals?