Title: How to create top posts / pages shortcode
Last modified: September 1, 2016

---

# How to create top posts / pages shortcode

 *  Resolved [antanto](https://wordpress.org/support/users/antanto/)
 * (@antanto)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-create-top-posts-pages-shortcode/)
 * Hi there,
 * I love the plugin. I’d love to be able to do a bit more with the email reports
   though please. Is there a way to use the wp_statistics_get_top_pages()
    to produce
   a shortcode in an email which displays the top pages?
 * I also want our authors to be able to see the results of their posts. Is there
   a way to create shortcodes for that days/week’s individual posts? I’m sure there
   must be a way as those stats are displayed in WP itself.
 * Can you help?
 * Many thanks
 * Anthony
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

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

 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-create-top-posts-pages-shortcode/#post-7565293)
 * The shortcodes are documented in the admin manual, there is no shortcode that
   maps against `wp_statistics_get_top_pages()`.
 * You can use existing shortcodes to do a day/week stats on a post, but it’s probably
   better to let them access the post stats page instead. If you go in to the edit
   screen of a post/page you can see the hit statistics in the publish box, clicking
   on the hit count takes you to a statistics page for that post.
 *  Thread Starter [antanto](https://wordpress.org/support/users/antanto/)
 * (@antanto)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-create-top-posts-pages-shortcode/#post-7565358)
 * Thanks Greg, that’s a shame. I want to be able to proactively push the stats 
   to our authors but it doesn’t look like that’s possible. To do day / week stats
   on a post could I set it up so it automatically pulls in the latest posts or 
   would I have to manually put in the post ID?
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-create-top-posts-pages-shortcode/#post-7565467)
 * The plugin is primarily for admin’s to use, so doing things like you want is 
   outside of the scope that we support.
 * There’s no manual intervention required for the post stats, they are pulled directly
   from the database.

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

The topic ‘How to create top posts / pages shortcode’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Greg Ross](https://wordpress.org/support/users/gregross/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-create-top-posts-pages-shortcode/#post-7565467)
 * Status: resolved