• Resolved hatchbackcreative

    (@hatchbackcreative)


    Our site is a recipe website and we have members who register and have profiles using Ultimate Member. “Recipes” is a custom post type we have setup and members can add posts. How would we display the recipes by the author on their profile page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Towhid

    (@cryptex_vinci)

    Hi @hatchbackcreative

    You may use ‘um_profile_query_make_posts’ filter to change post types in the “Posts” tab.

    See example below. just change ‘custom_post_type’ to your post type. Add this code snippet to your themes functions.php file.

    /**
     * Custom post type in the post tab
     * @param array $args
     * @return array
     */
    function um_custom_post_types_to_posts_tab( $args ) {
    
    	$args['post_type'] = array(
    			'post',
    			'custom_post_type',
    	);
    
    	return $args;
    }
    add_filter( 'um_profile_query_make_posts', 'um_custom_post_types_to_posts_tab', 10 );

    Thanks

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @hatchbackcreative

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter hatchbackcreative

    (@hatchbackcreative)

    that worked great – thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add posts by the author to their profile page’ is closed to new replies.