Title: Using Avada theme display the posts using numbers
Last modified: August 22, 2016

---

# Using Avada theme display the posts using numbers

 *  [hariprasad_y](https://wordpress.org/support/users/hariprasad_y/)
 * (@hariprasad_y)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/using-avada-theme-display-the-posts-using-numbers/)
 * We are using the Avada-3.6.2 theme, We have updated some posts on this page [http://www.privatevillasphuket.com/wp/guest-comments](http://www.privatevillasphuket.com/wp/guest-comments/)
 * We need to display the posts using numbers like the below image We do not need
   to show the day of the month on the left hand side – just the month and year .
 * <img src=”[http://www.privatevillasphuket.com/example.jpg&#8221](http://www.privatevillasphuket.com/example.jpg&#8221);/
   >
 * We found some solution for this here is the code but it’s not working for us.
   
   URL OF THE CODE : [http://www.hongkiat.com/blog/wordpress-tweaks-for-post-management](http://www.hongkiat.com/blog/wordpress-tweaks-for-post-management)
 * 5. Display an incrementing number on each post
    The tweak below will let you 
   display an incrementing number on each post, and implementing it is pretty simple.
   First, paste the following function into your functions.php file: function updateNumbers(){
   global $wpdb; $querystr = “SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb-
   >posts.post_status = ‘publish’ AND $wpdb->posts.post_type = ‘post’ “; $pageposts
   = $wpdb->get_results($querystr, OBJECT); $counts = 0 ; if ($pageposts): foreach(
   $pageposts as $post): setup_postdata($post); $counts++; add_post_meta($post->
   ID, ‘incr_number’, $counts, true); update_post_meta($post->ID, ‘incr_number’,
   $counts); endforeach; endif; } add_action ( ‘publish_post’, ‘updateNumbers’ );
   add_action ( ‘deleted_post’, ‘updateNumbers’ ); add_action ( ‘edit_post’, ‘updateNumbers’);
   Once you’re done, you can display the post number with the following code. Note
   that it has to be used within the loop. <?php echo get_post_meta($post->ID,’incr_number’,
   true); ?>
 * Please let me know the solution about this issue.

The topic ‘Using Avada theme display the posts using numbers’ is closed to new replies.

## Tags

 * [posts](https://wordpress.org/support/topic-tag/posts/)
 * [wordrpess](https://wordpress.org/support/topic-tag/wordrpess/)

 * 0 replies
 * 1 participant
 * Last reply from: [hariprasad_y](https://wordpress.org/support/users/hariprasad_y/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/using-avada-theme-display-the-posts-using-numbers/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
