Title: Get user listings
Last modified: August 4, 2017

---

# Get user listings

 *  Resolved [pre20](https://wordpress.org/support/users/pre20/)
 * (@pre20)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/get-user-listings/)
 * Hi,
 * How can I get a link or a call of all listings published by an specefic user?
 * The profiles link to the default /author with 0 results as the user didn’t write
   any post, but wrote many listings.
 * Thanks

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

 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [8 years, 9 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9382409)
 * There is a shortcode you can use, documented here: [http://docs.businessdirectoryplugin.com/misc/shortcodes.html](http://docs.businessdirectoryplugin.com/misc/shortcodes.html)
 * But that requires that you hard-code the username in it. We don’t yet have a 
   shortcode to show the listings of a user when a name is entered.
 * That’s something we can consider for future development, but not something the
   plugin allows for today.
 *  [jomo](https://wordpress.org/support/users/jonathanmoorebcsorg/)
 * (@jonathanmoorebcsorg)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9426130)
 * I suggest this, to add the listing to the standard author archive page:
 *     ```
       /**
        * Add CPTs to author archives
        * 
       * @param WP_Query &$this The WP_Query instance (passed by reference).
       */ 
       function custom_post_author_archive($query) {
           if ($query->is_author)
           {
               $query->set( 'post_type', array('wpbdp_listing', 'post') );
           }
           remove_action( 'pre_get_posts', 'custom_post_author_archive' );
       }
       add_action('pre_get_posts', 'custom_post_author_archive');
       ```
   
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9428685)
 * Great suggestion [@jonathanmoorebcsorg](https://wordpress.org/support/users/jonathanmoorebcsorg/)!
   Thanks for posting it.
 *  Thread Starter [pre20](https://wordpress.org/support/users/pre20/)
 * (@pre20)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9438601)
 * It works, thanks!
 * It is possible to add it to a custom page, to not mix with the posts? Because
   some member plugins make a new profile page so the author page is no longer used
   and redirect it to the profile.
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9441503)
 * Hi [@pre20](https://wordpress.org/support/users/pre20/),
 * I’m not sure I understand your question here–custom page for what? For the listings
   by a specific author?
 * Or are you talking about replacing the profile page for the user on the admin
   dashboard here?
 *  Thread Starter [pre20](https://wordpress.org/support/users/pre20/)
 * (@pre20)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9443656)
 * Yes, I’m talking about show the user listings (implement that code) in a custom
   page like /user-posts instead of the author page.
 * Or in the user/name, because some plugin memberships replace the default author
   page by a custom profile page so to show them on it.
    -  This reply was modified 8 years, 8 months ago by [pre20](https://wordpress.org/support/users/pre20/).
 *  Plugin Author [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * (@businessdirectoryplugin)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9443696)
 * OK, we’ll definitely add that to the list for future development.

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

The topic ‘Get user listings’ is closed to new replies.

 * ![](https://ps.w.org/business-directory-plugin/assets/icon-256x256.png?rev=2901888)
 * [Business Directory Plugin - Easy Listing Directories for WordPress](https://wordpress.org/plugins/business-directory-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/business-directory-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/business-directory-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/business-directory-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/business-directory-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/business-directory-plugin/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Business Directory Plugin](https://wordpress.org/support/users/businessdirectoryplugin/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/get-user-listings/#post-9443696)
 * Status: resolved