There is a default archive.php
template in all WordPress themes which has a static layout that looks like the blog and which is used any time a category archive is directly accessed using the category link or URL, that is where you have to put your code, in the place that you want.
So, basically you will have to do something like this wihtin the archive.php to get the number of post:
$category = get_category($id);
$count = $category->category_count;
Then you print it the way you want, echo "This category has ".$count." posts";
, or something like that.
Related Posts:
- How to check if I’m on the last page of posts?
- How can I hide a category from Contributors in the edit/add new post screen?
- Get top parent category
- Category page doesn’t use category.php, instead it redirects to homepage
- Multiple post categories – single permalink
- wp_update_nav_menu_item() to insert categories
- How to exclude uncategorized from permalink structure /%category%/%postname%/
- Redirecting specific category posts to subdomain
- Create product category and keyword search form in woocommerce? [closed]
- How can I create a loop to build slides based on multiple categories using Coda Slider
- Saving two categories from two dropdowns in front end posting form
- Best and Cleanest way to remove /category/ from category permalinks? [duplicate]
- Categories list loop – add separator every year
- How would you create a “weekly” archive?
- Exclude most recent posts from specific category in wp_query()
- Display all posts with same title
- wp_list_categories to show list of categories and the description
- How to display a description of a given category from a custom taxonomy
- What type of page should i use? static page or category page? and what’s the difference? [closed]
- Filtering by Category doesnt paginate correctly on the backend
- Direct link to category?
- How to modify category.php to list posts alphabetically?
- Categories vs. Page Site Organization
- Sorting posts by season
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Create blog page only to see one category
- Looking for the best solution to build this Blog structure? Picture attached?
- Getting URL of archive (category) page
- Strip a word from wp_list_categories
- List all the categories with or without post
- Set Current Category to Active in category.php
- How to hide category description in the subpages? [closed]
- Previous/next post links displaying wrong category than is desired
- SQL to migrate post types to taxonomy
- WordPress query via checkbox form
- WordPress Post # of # filtered by category slug
- wordpress multisite… collect all posts on main blog – exclude category?
- Automatically redirect a page to a category that share the same slug
- How to put an array in is_category
- How do I add Category Body Classes to Admin?
- Target a specific category from a custom taxonomy?
- How can I display the number of post associated to a category in Twig/Timber WordPress? [closed]
- Multiple Category Search with and operator in WordPress
- get_posts() from parent category only using a shortcode
- Filter posts by categories ajax is showing nothing
- How to display child categories of all parent category within a singe loop?
- How can I add a class to displays a category?
- How to show only the name of one category above each posts in frontpage?
- WP_Query – using category__and when one of the categories is 0
- Multiple categories for one menu item?
- Tags Instead of Category
- Hide categories from frontend, but not admin / post editor
- Exclude categories from homepage not longer working
- Remove category link
- javascripts files not linking to my category slugs?
- Post to inherit custom category background image from parent
- Related posts widget – category
- Editing Loop So It Targets Specific Tags?
- Pretty URLs with Categories and Tags
- Select posts that match multiple category names, must match all categories listed
- How can i display category title over thumbnail?
- Header Link function not working. Problem with bloginfo()
- WordPress category filters as subcategories
- Sort posts alphabetically by category/custom taxonomy, insert divider between different types
- Need help with major category and permalink re-organization
- Include home page template in specific category template
- How to use category slug with a regular page
- Modifying category order
- display current portfolio categories from a specific parent
- Please tell how to stop the category from showing up on posts
- how to get only grandchild category from a child category
- Remove “category” from permalink with add_rewrite_rule
- Next and previous links category infinite loop
- How to hook into creating a category?
- show only terms from parent category
- show posts in archive page based on selected catagory
- How to display child-category PAGES on a category page
- How to display total views of all posts of one category?
- Get the categorie name of Event Organiser plugin [closed]
- get_categories returns top-level categories instead of child categories
- Show posts from all categories
- How to show “category” name?
- Display the category name of a post that is in two different categories
- filter single_cat_title avoiding the breadcrumbs
- htaccess redirect for all categories converted to tags now showing 404
- Category page with gallery for each post
- (WordPress) How to get custom taxonomy parent name?
- Show one same template for two category
- My Query is getting the wrong data
- Search functionality with multiple categories
- Make a menu visible for a single category and it’s content
- WordPress Loop Prob
- Display post content from category name using ajax
- WooCommerce category display in custom page
- How to display the category featured images [closed]
- How to define category ID in an array?
- Function to reference post meta in place of category Woocommerce
- hide_empty property not working when using get_terms
- Category Redirection Problem
- Hierarchical outline of posts