Title: Default setting for custom post type
Last modified: May 28, 2018

---

# Default setting for custom post type

 *  Resolved [satnapar](https://wordpress.org/support/users/satnapar/)
 * (@satnapar)
 * [8 years ago](https://wordpress.org/support/topic/default-setting-for-custom-post-type/)
 * Hik there, is there any possibility to chose default template for a certain custom
   post type?

Viewing 1 replies (of 1 total)

 *  [Nikhil Chavan](https://wordpress.org/support/users/nikschavan/)
 * (@nikschavan)
 * [8 years ago](https://wordpress.org/support/topic/default-setting-for-custom-post-type/#post-10336314)
 * Hello [@satnapar](https://wordpress.org/support/users/satnapar/),
 *     ```
       add_filter( 'template_include', 'default_templatte_post_type', 999 );
   
       function default_templatte_post_type( $original ) {
       	$file = FPT_DIR . 'templates/default/template-page-builder-no-header-footer.php';
   
       	// Just to be safe, we check if the file exist first
       	if ( file_exists( $file ) && 'property' == get_post_type() ) {
       		return $file;
       	}
   
       	return $original;
       }
       ```
   
 * Change `property` to slug of your post type from above snippet.
    Here is a doc
   which explains how you can add custom PHP code your site – [https://wpastra.com/docs/add-custom-php-code/](https://wpastra.com/docs/add-custom-php-code/)
    -  This reply was modified 8 years ago by [Nikhil Chavan](https://wordpress.org/support/users/nikschavan/).

Viewing 1 replies (of 1 total)

The topic ‘Default setting for custom post type’ is closed to new replies.

 * ![](https://ps.w.org/fullwidth-templates/assets/icon-256x256.png?rev=2810905)
 * [Fullwidth Templates for Any Theme & Page Builder](https://wordpress.org/plugins/fullwidth-templates/)
 * [Support Threads](https://wordpress.org/support/plugin/fullwidth-templates/)
 * [Active Topics](https://wordpress.org/support/plugin/fullwidth-templates/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fullwidth-templates/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fullwidth-templates/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nikhil Chavan](https://wordpress.org/support/users/nikschavan/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/default-setting-for-custom-post-type/#post-10336314)
 * Status: resolved