Title: zuko's Replies | WordPress.org

---

# zuko

  [  ](https://wordpress.org/support/users/zuko/)

 *   [Profile](https://wordpress.org/support/users/zuko/)
 *   [Topics Started](https://wordpress.org/support/users/zuko/topics/)
 *   [Replies Created](https://wordpress.org/support/users/zuko/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/zuko/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/zuko/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/zuko/engagements/)
 *   [Favorites](https://wordpress.org/support/users/zuko/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to echo the userid in a doshortcode](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/)
 *  Thread Starter [zuko](https://wordpress.org/support/users/zuko/)
 * (@zuko)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/#post-5820754)
 * Just tried this and it kills the page
 *  <?php global $current_user;
 * $current_user = wp_get_current_user();
 * echo do_shortcode( ‘[sabai-directory-listings return=”1″ user_name=”‘ . $current_user.‘”]’);?
   >
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to echo the userid in a doshortcode](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/)
 *  Thread Starter [zuko](https://wordpress.org/support/users/zuko/)
 * (@zuko)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/#post-5820752)
 * The following spits out all listings by admin
 *  <?php echo do_shortcode( ‘[sabai-directory-listings return=”1″ user_name=”admin”]’);?
   >
 * I want to place this code in the profile.php file in my wordpress theme to show
   the listings from the user the profile you are viewing at the time dynamically
 * Something like;
 *  <?php echo do_shortcode( ‘[sabai-directory-listings return=”1″ user_name=”‘ .
   $userprofileID . ‘”]’ ); ?>
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [how to echo the userid in a doshortcode](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/)
 *  Thread Starter [zuko](https://wordpress.org/support/users/zuko/)
 * (@zuko)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/how-to-echo-the-userid-in-a-doshortcode/#post-5820745)
 * <?php echo do_shortcode( ‘[sabai-directory-listings return=”1″ user_name=”‘ .
   $current_user . ‘”]’ ); ?>
 * Would this work?

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