Title: Question about Plugin
Last modified: August 21, 2016

---

# Question about Plugin

 *  [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * (@respectyoda)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/question-about-plugin-6/)
 * I am aware from the description of the plugin that the shortcode can be used 
   to display posts from a specific user:
 *     ```
       [latestbyauthor author="username" show="3"]
       ```
   
 * However, how could I use a loop? Let’s say I am storing the author username in
   a variable since it will depend on which profile [of let’s say a student] is 
   being shown (the posts by the student will show up on the specific student’s 
   profile). For instance,
 *     ```
       // get the author's username field of the student meta box cuz student is a custom post type and the metabox links the student post type to the author username
       $the_username = get_post_meta($post->ID, 'gt_student_un', true)
       ```
   
 * Then I could do something like…
 *     ```
       [latestbyauthor author="$the_username" show="3"]
       ```
   
 * [https://wordpress.org/plugins/latest-posts-by-author/](https://wordpress.org/plugins/latest-posts-by-author/)

The topic ‘Question about Plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/latest-posts-by-author.svg)
 * [Latest Posts by Author](https://wordpress.org/plugins/latest-posts-by-author/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/latest-posts-by-author/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/latest-posts-by-author/)
 * [Active Topics](https://wordpress.org/support/plugin/latest-posts-by-author/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/latest-posts-by-author/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/latest-posts-by-author/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [respectyoda](https://wordpress.org/support/users/respectyoda/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/question-about-plugin-6/)
 * Status: not resolved