If the theme your’re using doesn’t do anything fancy, but uses the_archive_title()
to render the “Lignano Sabbiadoro”, then you should be able to modify it with the get_the_archive_title
filter.
Something along these lines.
add_filter('get_the_archive_title', 'my_get_the_archive_title_filter', 10, 3);
function my_get_the_archive_title_filter(string $title, string $original_title, string $prefix): string {
if (! is_category()) {
return $title;
}
$current_category = get_queried_object();
return sprintf(
'%s <span class="post-count">%d</span>',
$current_category->name,
$current_category->count
);
}
Related Posts:
- C++ – how to find the length of an integer
- How can I make a PHP counter?
- Counting the posts of a loop (WP_Query)?
- Category and children post count
- Hide the post count behind Post Views (Remove All, Published and Trashed) in Custom Post Type
- How to display 2 equal columns of li based on the count of items in wp_nav_menu divided by 2?
- Show weekly posts statistic in WordPress
- Increasing post view count automatically [duplicate]
- Count number of posts by author in a category
- How we count the user draft posts
- What is the best way to count and display the number of posts?
- Get count of terms with a post and another taxonomy term?
- Get Gravity Forms field values and count how many? [closed]
- Counting posts in custom post type by author
- Show ellipsis (…) only if the number of characters exceeds limit defined in substr
- Get total views of all posts by author
- Count post + add number =
- How to do simple addition to increase favorites count of my wordpress posts
- Count posts published in one particular day: the lighter way
- What is the best way to do this? [closed]
- Search Count WordPress Theme
- How to read out the excerpt length (for if-condition)
- $count_posts->draft & published
- CountPost WordPress Custom Taxonomy
- get the count of table rows
- How to calculate posts number? [closed]
- How make animation increase of number
- Having problems getting the number of plays in a WordPress Playlist from an audio file
- How to show the amount of post that have on the site?
- Counting the number of elements with the values of x in a vector
- PHP 7.2 – Warning: count(): Parameter must be an array or an object that implements Countable
- How can I count the occurrences of a list item?
- Count how many files in directory PHP
- count posts from custom taxonomy terms by year
- Comment Count for each Comment Author
- Display user’s total comment count outside The Loop
- Count posts that have specific taxonomy term attached
- Count number of post in Taxonomy?
- How to use global post counter in the loop?
- Taxonomy list. Order by a specific custom post type count
- get_queried_object error How to show post count by month in the taxonomy page
- wp_count_posts, wp_count_terms and wp_count_comments for specific user?
- How to count custom post types with conditional operators
- Count posts with specific term_meta
- Count all comments of a custom post type
- How to count rows of table in the_content()
- Adding country tags automatically
- Query/list all terms and their custom post count
- Fastest way of counting posts of a custom post type in a specific taxonomy term?
- Post count by month of taxonmy term
- custom post type category count shortcode
- check if author has published posts in custom post type, then send mail
- Getting comment count per post not working
- How to count posts with specific arguments
- How to display author post count for multiple custom post types?
- Show posts count for Categories and Tags in wp_nav_menu
- Count number of posts of current month
- How to show the number of website visitors in my theme
- Best way to count visitors?
- Get Author Count By Day, Week and Month
- WordPress Count posts within a custom post type
- (get_post_ancestors == 2) is returning true on 1 as well?
- counting trackbacks, pingbacks and comments of a post
- Echo the number of posts being displayed
- How to Define Custom Number of Items in Comment Feed
- Order terms by count – missing terms
- Count user posts and store the number for later use
- How include comment and post count of user in this custom query
- How to cache the results of a query and display the cached results
- Count the total views of all user posts published
- Count Post and Page Views based on meta_value Using Shortcode in Dashboard Widget
- Allow a specific user role I have created to only upload one image to his media library
- Counting instances of words in the results of a post query
- Query posts by post type, author and post meta
- Display category filters for custom post type when category is shared by multiple post types
- check the first login for specific roles
- How to display total user count by specific role in WordPress as statistics?
- get_queried_object not work in taxonomy page
- Sorting Tag Cloud by Popularity
- Reverse count page view and show on other page
- How Can I add show_post_count in get_archives_link?
- Modify the category post counting function
- Set Pagination count according to post count
- Implementation to count page visits of unique visitors based on a cookie
- Add subcategories posts to the counts column at the admin’s categories list
- Columns depending on posts count
- counting post from a wp-query using sticky_post
- Custom Looping of WordPress Posts
- Link Button url count php and wordpress
- Trying to Display Number of Posts in Term
- User count only for role frontend vendor
- Category count but only if category has at least one post
- How to get the count for each taxonomy term
- How to add a post counter to the list of custom taxonomy terms?
- How to limit the number of posts a user can publish based on user type
- post_count not working
- How do I count the number of pages a user has seen on my site, and force them to log in after a certain amount
- Display post count on archive page in reverse order
- Count the number of matching post names in foreach loop
- How do i display the number of images on the “post screen”