Title: Specify post ID in shortcode
Last modified: May 30, 2019

---

# Specify post ID in shortcode

 *  Resolved [annemarietn](https://wordpress.org/support/users/annemarietn/)
 * (@annemarietn)
 * [7 years ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/)
 * Great plugin! I have a theme which builds collection pages that lists multiple
   blogposts, showing the title and author next to each post title. We don’t show
   the excerpt or content on those pages but would like to show the reading time.
 * If I use the shortcode [rt_reading_time] on those collection pages (e.g. next
   to each blog post entry), then the reading time shown is for the collection page
   itself, instead of for each of the blog posts that are being listed.
 * Is it possible for you to add a shortcode version that allows a specific post
   ID to be passed into it as an attribute so that the reading time is calculated
   for that post ID and not the current page ID?
 * I’d be happy to work on this myself if you’d allow me to add this functionality
   to your plugin.
 * Many thanks, Anne Marie

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

 *  Plugin Author [Jason Yingling](https://wordpress.org/support/users/yingling017/)
 * (@yingling017)
 * [7 years ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/#post-11597939)
 * Hi there, that could definitely be useful as an optional parameter to pass the
   shortcode. You can run the `rt_calculate_reading_time` function too which takes
   the post id and the reading time options as well.
 * You’re more than welcome to submit a pull request on the github repository for
   the plugin. [https://github.com/yingles/reading-time-wp](https://github.com/yingles/reading-time-wp)
 *  Thread Starter [annemarietn](https://wordpress.org/support/users/annemarietn/)
 * (@annemarietn)
 * [7 years ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/#post-11600242)
 * Thanks Jason, I’ve added an optional post_id parameter to the shortcode in this
   pull request: [https://github.com/yingles/reading-time-wp/pull/6](https://github.com/yingles/reading-time-wp/pull/6)
 *  Plugin Author [Jason Yingling](https://wordpress.org/support/users/yingling017/)
 * (@yingling017)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/#post-11647308)
 * Hi there, I just published your PR in 2.0.5. Thanks for submitting!
 *  Thread Starter [annemarietn](https://wordpress.org/support/users/annemarietn/)
 * (@annemarietn)
 * [6 years, 11 months ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/#post-11647798)
 * Thanks so much Jason!

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

The topic ‘Specify post ID in shortcode’ is closed to new replies.

 * ![](https://ps.w.org/reading-time-wp/assets/icon-256x256.png?rev=2355751)
 * [Reading Time WP](https://wordpress.org/plugins/reading-time-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/reading-time-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/reading-time-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/reading-time-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/reading-time-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/reading-time-wp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [annemarietn](https://wordpress.org/support/users/annemarietn/)
 * Last activity: [6 years, 11 months ago](https://wordpress.org/support/topic/specify-post-id-in-shortcode/#post-11647798)
 * Status: resolved