Title: author custom post type
Last modified: May 3, 2024

---

# author custom post type

 *  Resolved [talleragencia](https://wordpress.org/support/users/talleragencia/)
 * (@talleragencia)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/author-custom-post-type/)
 * Hello, I have created a type of content and I have users to create entries in
   that type of content, when I click on the author’s profile page it does not show
   it, because it does not recognize the entries of the content type.

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [2 years, 1 month ago](https://wordpress.org/support/topic/author-custom-post-type/#post-17731109)
 * Hi [@talleragencia](https://wordpress.org/support/users/talleragencia/)
 * For the moment, I am going to assume you are referring to your given post types
   not appearing in a given user/author’s archive
 * Something like this should help. It’d go in your active theme’s functions.php
   file
 *     ```wp-block-code
       function my_cptui_add_post_types_to_archives( $query ) {
       	// We do not want unintended consequences.
       	if ( is_admin() || ! $query->is_main_query() ) {
       		return;    
       	}
   
       	if ( is_author() empty( $query->query_vars['suppress_filters'] ) ) {
       		$cptui_post_types = cptui_get_post_type_slugs();
   
       		$query->set(
       			'post_type',
       			array_merge(
       				array( 'post' ),
       				$cptui_post_types
       			)
       		);
       	}
       }
       add_filter( 'pre_get_posts', 'my_cptui_add_post_types_to_archives' );
       ```
   
 * This will merge in all content types registered with CPTUI into the post types
   considered for the author archive.

Viewing 1 replies (of 1 total)

The topic ‘author custom post type’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-type-ui/assets/icon-256x256.png?rev=2744389)
 * [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-type-ui/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-type-ui/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-type-ui/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-type-ui/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-type-ui/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/author-custom-post-type/#post-17731109)
 * Status: resolved