Title: Count tickets.
Last modified: August 22, 2016

---

# Count tickets.

 *  Resolved [Bage](https://wordpress.org/support/users/bagerathan/)
 * (@bagerathan)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/)
 * I am creating a custom dashboard for the support-users. And I wish to list open
   tickets & closed tickets. How do I count it for each user please?
 * Is there any documentations please?
 * Thanking you.
 * [https://wordpress.org/plugins/awesome-support/](https://wordpress.org/plugins/awesome-support/)

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

 *  Thread Starter [Bage](https://wordpress.org/support/users/bagerathan/)
 * (@bagerathan)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/#post-5788933)
 * Just to clarify, I am able to get the total number of tickets by a user, but 
   not separately by “closed” or “awaiting reply.”
 * Thanks again.
 *  Plugin Author [julien731](https://wordpress.org/support/users/julien731/)
 * (@julien731)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/#post-5789149)
 * You can count the tickets by using the function `get_tickets()`.
 * The function takes 2 parameters:
    - `$status`: can be `open` or `closed`
    - `$args`: an array of arguments
 * To get tickets with a specific state, use `post_status` in the `$args` array.
   Available states are: `queued`, `processing`, `hold`.
 * The function returns an array of tickets if any or an empty array otherwise.
 * **Examples:**
 * Get all open tickets:
 *     ```
       $tickets = get_tickets( 'open' );
       ```
   
 * Get all open tickets in progress:
 *     ```
       $tickets = get_tickets( 'open', array( 'post_status' => 'queued' ) );
       ```
   
 *  Thread Starter [Bage](https://wordpress.org/support/users/bagerathan/)
 * (@bagerathan)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/#post-5789150)
 * Awesome. Thank you.
 *  Plugin Author [julien731](https://wordpress.org/support/users/julien731/)
 * (@julien731)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/#post-5789162)
 * You’re welcome. Don’t forget to [review the plugin](https://wordpress.org/support/view/plugin-reviews/awesome-support#postform)
   if you’re satisfied 🙂

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

The topic ‘Count tickets.’ is closed to new replies.

 * ![](https://ps.w.org/awesome-support/assets/icon-256x256.png?rev=1849681)
 * [Awesome Support - WordPress HelpDesk & Support Plugin](https://wordpress.org/plugins/awesome-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/awesome-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/awesome-support/)
 * [Active Topics](https://wordpress.org/support/plugin/awesome-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/awesome-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/awesome-support/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [julien731](https://wordpress.org/support/users/julien731/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/count-tickets/#post-5789162)
 * Status: resolved