Title: Using shortcode in my author template
Last modified: December 5, 2022

---

# Using shortcode in my author template

 *  Resolved [barceloch](https://wordpress.org/support/users/barceloch/)
 * (@barceloch)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-in-my-author-template/)
 * I’m trying to use the shortcode in the author template on my web page, the problem
   is that when accessing /author/pepe the image of the user for whom I am authenticated
   is displayed and not that of “pepe”…
 *  I want it to function the same as the profile page so that if visits /profile/
   pepe, the images that are displayed are those of that user.
 *  how can i achieve that?
 *     ```
       ...
       <div class="author_page">
       	<?php echo do_shortcode("[uwp_profile_header]"); ?>
       	<div class="author_page_sidebar">
       		<?php do_action( 'el_author_info' ); ?>
       	</div>
       ...
       ```
   

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

 *  [alexrollin](https://wordpress.org/support/users/alexrollin/)
 * (@alexrollin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-in-my-author-template/#post-16260342)
 * Hello,
 * please try this shortcode instead
 * [uwp_profile_header user_id=”post_author”]
 * Let us know how it goes
 *  [alexrollin](https://wordpress.org/support/users/alexrollin/)
 * (@alexrollin)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-in-my-author-template/#post-16260358)
 * Hello,
 * you can also try this, another approach
 * `<?php echo do_shortcode("[uwp_profile_header user_id=".get_query_var('author')."]");?
   >`
 *  Thread Starter [barceloch](https://wordpress.org/support/users/barceloch/)
 * (@barceloch)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-in-my-author-template/#post-16262064)
 * Thank you very much…

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

The topic ‘Using shortcode in my author template’ is closed to new replies.

 * ![](https://ps.w.org/userswp/assets/icon-256x256.png?rev=2784318)
 * [UsersWP - Front-end login form, User Registration, User Profile & Members Directory plugin for WP](https://wordpress.org/plugins/userswp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/userswp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/userswp/)
 * [Active Topics](https://wordpress.org/support/plugin/userswp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/userswp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/userswp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [barceloch](https://wordpress.org/support/users/barceloch/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/using-shortcode-in-my-author-template/#post-16262064)
 * Status: resolved