Title: Tag count
Last modified: August 20, 2016

---

# Tag count

 *  Resolved [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/)
 * I want when someone click on any tag and when that opens … the count,numbers 
   of that particular tag should be displayed’
 * For Example you click on tag ‘WORK’
 * Text to be displayed on starting:
 * 30 posts have been added under tag ‘WORK’
 * same for ever TAG
 * I am using ‘twenty ten theme’
 * Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180703)
 * edit _**tag.php**_
 * one possibility, add:
 *     ```
       <?php echo $wp_query->found_posts; ?> posts have been added under tag '<?php echo strtoupper(single_tag_title( '', false )); ?>'
       ```
   
 *  Thread Starter [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180713)
 * wow… That Worked perfectly.. Thanks a lot.. You are genius!!!!!!!1
 *  Thread Starter [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180714)
 * I had one more query, Pl help me on this too!
 * I am trying to make meta title Perfect..
 * So added below php into header.php
 * _[ Moderator Note: Please post code or markup snippets between backticks or use
   the code button. Also? Don’t type in all caps. ]_
 *     ```
       <?php
       $blog_title = get_bloginfo('name'); 
   
       if (is_home()) {
           $blog_title = get_bloginfo('name') . " - " . get_bloginfo('description');
   
       }
       if (is_single()) {
           $blog_title = get_the_title() . "   " . get_bloginfo('name');
       }
       if (is_category()) {
           $blog_title = single_cat_title("",false);
       }
   
       if (is_page()) {
           $blog_title = the_title();
       } 
   
       ?>
       <title><?php echo $blog_title; ?></title>
       ```
   
 * But now problem is that.. when someone opens my home page or any category page,
   and they move to next page like page-2, 3, or 4 etc , my meta title shows same‘
   Blog name’ for every page ..
 * I WANT IT SHOULD BE LIKE :-
 * BLOG NAME – PAGE NO eg PAGE-1, 2 ,3 OR WHATSOEVER PAGE IS ACTIVE..
 * Theme is twenty ten
    thanks in advance..
 * _[ [http://codex.wordpress.org/Forum\_Welcome#No\_Bumping](http://codex.wordpress.org/Forum_Welcome#No_Bumping)]_
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180715)
 * this is already covered in the existing meta title tag code in Twenty Ten:
 *     ```
       // Add a page number if necessary:
       	if ( $paged >= 2 || $page >= 2 )
       		echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
       ```
   
 *  Thread Starter [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180716)
 * Thanks for you quick reply but I have added this line into header.php but still
   pages have same meta title.. below is the php I have added, Pl correct me where
   I am wrong!
 *     ```
       <?php
       $blog_title = get_bloginfo('name'); 
   
       if (is_home()) {
           $blog_title = get_bloginfo('name') . " - " . get_bloginfo('description');
   
       }
       if (is_single()) {
           $blog_title = get_the_title() . "   " . get_bloginfo('name');
       }
       if (is_category()) {
           $blog_title = single_cat_title("",false);
       }
   
       if (is_page()) {
           $blog_title = the_title();
       // Add a page number if necessary:
       	if ( $paged >= 2 || $page >= 2 )
       		echo ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
   
       } 
   
       ?>
       <title><?php echo $blog_title; ?></title>
       ```
   
 * Thanks in advance
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180717)
 * don’t add this under the ‘is_page()’ conditional –
 * do it like this, for example:
 *     ```
       <?php
       $blog_title = get_bloginfo('name'); 
   
       if (is_home()) {
           $blog_title = get_bloginfo('name') . " - " . get_bloginfo('description');
   
       }
       if (is_single()) {
           $blog_title = get_the_title() . "   " . get_bloginfo('name');
       }
       if (is_category()) {
           $blog_title = single_cat_title("",false);
       }
   
       if (is_page()) {
           $blog_title = the_title('','',false);
       }
       // Add a page number if necessary:
       	global $page, $paged;
       	if ( $paged >= 2 || $page >= 2 )
       		$blog_title .= ' | ' . sprintf( __( 'Page %s', 'twentyten' ), max( $paged, $page ) );
       ?>
       <title><?php echo $blog_title; ?></title>
       ```
   
 *  Thread Starter [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180718)
 * It worked! thanks a tons
 *  Thread Starter [newone1](https://wordpress.org/support/users/newone1/)
 * (@newone1)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180719)
 * Done

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Tag count’ is closed to new replies.

## Tags

 * [number of tags](https://wordpress.org/support/topic-tag/number-of-tags/)
 * [tag count](https://wordpress.org/support/topic-tag/tag-count/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [newone1](https://wordpress.org/support/users/newone1/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/tag-count-1/#post-3180719)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
