Support » Plugin: WP User Manager - User Profile Builder & Membership » Change displayed posts type

  • Resolved tavomenas

    (@tavomenas)


    Hi,
    on settings>profiles>profile content I can enable the option to display users submitted posts on their profile page.

    Is it possible to change the type of post which is displayed? For example, my users submit “portfolio” posts, can I show on their profile page their portfolio entries?

Viewing 1 replies (of 1 total)
  • Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi @tavomenas

    Yes you can modify the post type through a filter, you can add this code to your theme’s functions.php file

    add_filter(
    	'wpum_get_posts_for_profile',
    	function ( $args ) {
    		$args['post_type'] = 'your_post_type_here';
    		return $args;
    	}
    );

    Make sure you modify the string “your_post_type_here” with the name of your post type.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.