Title: Filter Based On Users
Last modified: February 23, 2021

---

# Filter Based On Users

 *  Resolved [captainp71](https://wordpress.org/support/users/captainp71/)
 * (@captainp71)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/filter-based-on-users/)
 * Hello, i will want to know how to display custom post type by current logged 
   in user. Thanks

Viewing 1 replies (of 1 total)

 *  Plugin Author [Markus Wiesenhofer](https://wordpress.org/support/users/markusfroehlich/)
 * (@markusfroehlich)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/filter-based-on-users/#post-14141275)
 * Hello,
    you can do this with the following filter in your functions.php.
 *     ```
       add_filter('wpcf7_you_tag_get_posts', 'wpcf7_you_tag_get_posts_by_current_user');
   
       function wpcf7_you_tag_get_posts_by_current_user( $post_args )
       {
       $post_args['author'] = get_current_user_id();
   
       return $post_args;
       }
       ```
   
 * Best regards
    Markus

Viewing 1 replies (of 1 total)

The topic ‘Filter Based On Users’ is closed to new replies.

 * ![](https://ps.w.org/cf7-post-fields/assets/icon-256x256.jpg?rev=1535329)
 * [Contact Form 7 - Post Fields](https://wordpress.org/plugins/cf7-post-fields/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cf7-post-fields/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cf7-post-fields/)
 * [Active Topics](https://wordpress.org/support/plugin/cf7-post-fields/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cf7-post-fields/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cf7-post-fields/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Markus Wiesenhofer](https://wordpress.org/support/users/markusfroehlich/)
 * Last activity: [5 years, 2 months ago](https://wordpress.org/support/topic/filter-based-on-users/#post-14141275)
 * Status: resolved