Title: Customized post template
Last modified: December 12, 2018

---

# Customized post template

 *  Resolved [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/)
 * Hi,
 * I’ve created a new custom post type using [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
   and I want to create a new post template for displaying this post type correctly.
 * Can I do it using OceanWP? If yes; May you please guide me to the starting point?
    -  This topic was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).
    -  This topic was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/customized-post-format/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/customized-post-format/page/2/?output_format=md)

 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10980526)
 * I created a child theme and I copied `partials/single/*` for creating my own 
   post format but it seems a wrong approach.
 * PS. I read this page from the documentation [Template Hierarchy](https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post)
   it seems I can customize `single.php` but I’m unable to see it in OceanWP.
 * I’m lost 🙁
    -  This reply was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10980702)
 * BTW, I’m unable to see **OceanWP Settings** in all the posts created by [Custom Post Type UI](https://wordpress.org/plugins/custom-post-type-ui/)
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982215)
 * Hello,
 * Try to Add the below code the functions.php file of the child theme using FTP
   or cPanel. It will add OceanWP Settings metabox in your custom post types. Edit
   the post types in the code.
 *     ```
       /**
        * Add the OceanWP Settings metabox in your CPT
        */
       function oceanwp_metabox( $types ) {
   
       	// Your custom post type
       	$types[] = 'your-post-type';
   
       	// Return
       	return $types;
   
       }
       add_filter( 'ocean_main_metaboxes_post_types', 'oceanwp_metabox', 20 );
       ```
   
 * If you want to edit the file, then you need to write your own function to fetch
   a template using for that custom post type. For example, ‘Review’ is a custom
   post type.
 * Step 1 – Copy `partials/single` folder under child theme and rename the ‘single’
   folder to ‘review’.
    Step 2. Now copy the singular.php file into your child theme
   and add the below code after line 52.
 *     ```
       elseif ( is_singular( 'review' ) {
            get_template_part( 'partials/review/layout' );
       }
       ```
   
 * Step 3. Now modified the file under review folder as per your need.
 * Hope it will help you.
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982422)
 * Thanks a lot.
 * It works!
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982439)
 * Happy to hear that!
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982448)
 * Oops,
 * When I applied step 2 I get a white page!
 *     ```
       		// Library post types
       		    				elseif ( is_singular( 'oceanwp_library' )
       		    						|| is_singular( 'elementor_library' ) ) {
   
       		    					get_template_part( 'partials/library/layout' );
   
       		    				}
       						elseif ( is_singular( 'software' ) {
       						     get_template_part( 'partials/software/layout' );
       						}
   
       							// All other post types.
       							else {
   
       		    					get_template_part( 'partials/single/layout', get_post_type() );
   
       		  					}
       ```
   
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982455)
 * What will happen if I ignore step 2?
 * When I ignored it I saw **OceanWP settings** in `software` post type and the 
   page of Post type worked fine.
    -  This reply was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).
    -  This reply was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10982680)
 * If you want to edit the theme file and code for the custom post type, then use
   Step 2, otherwise no need to do it. OceanWP settings metabox will work for custom
   post type after adding the code I gave you earlier.
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10983277)
 * [@apprimit](https://wordpress.org/support/users/apprimit/) I tried a lot but 
   I failed to make it works fine.
    May you please take a look into my child theme
   on Github [https://github.com/mbnoimi/blackocean](https://github.com/mbnoimi/blackocean)
    -  This reply was modified 7 years, 5 months ago by [mbnoimi](https://wordpress.org/support/users/mbnoimi/).
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-10987660)
 * Hello,
 * I just tested it and it is working for me. Try to install the Health Check plugin
   and enable Troubleshooting mode. Reload your site, save the permalinks again 
   to update the .htaccess file. Disable troubleshooting mode and check it works
   or not.
    Also, try to add the code (step 2) after line 44 instead of 52.
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-11001859)
 * I did exactly as you said above but unfortunately it didn’t work 🙁
 * Do you’ve some time to take a look into my website? If; yes I sent to you username&
   password to your blog’s email connect at wpyard.com.
 * I’m really sorry for disturbance.
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-11002703)
 * Hello,
 * Please don’t share login details here or anywhere. It is against the forum guidelines
   and I don’t want to violate it. You should also follow the forum guidelines –
   [Read guidelines here](https://wordpress.org/support/guidelines/)
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-11003024)
 * I didn’t, I sent mine to your personal email hoping you’ll help me to figure 
   out what’s going on.
 * BTW, This issue doesn’t occur in case I use “Twenty Nineteen” theme.
 *  [Amit Singh](https://wordpress.org/support/users/apprimit/)
 * (@apprimit)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-11006464)
 * Sharing login or contact information is violate the terms of forum guidelines.
   We are restricted and must follow the guidelines. You can consult with a developer
   to look into your issue. I can only guide you and can’t do coding support for
   your website. Hope you understand.
 *  Thread Starter [mbnoimi](https://wordpress.org/support/users/mbnoimi/)
 * (@mbnoimi)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/customized-post-format/#post-11006469)
 * Thanks

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/customized-post-format/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/customized-post-format/page/2/?output_format=md)

The topic ‘Customized post template’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/oceanwp/4.1.6/screenshot.png)
 * OceanWP
 * [Support Threads](https://wordpress.org/support/theme/oceanwp/)
 * [Active Topics](https://wordpress.org/support/theme/oceanwp/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/oceanwp/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/oceanwp/reviews/)

## Tags

 * [cpt](https://wordpress.org/support/topic-tag/cpt/)
 * [CPT UI](https://wordpress.org/support/topic-tag/cpt-ui/)

 * 30 replies
 * 4 participants
 * Last reply from: [oceanwp](https://wordpress.org/support/users/oceanwp/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/customized-post-format/page/2/#post-11167226)
 * Status: resolved