• I would like to have the settings I define in Customize > Blog > Single Post apply to my custom post types. How do I go about making that happen? Right now my CPTs do not have any of the Elements I have positioned appear.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello @tillmanj,

    Try adding the code explained in this article to the functions.php file of the child theme with using the sFTP/FTP or cPanel.

    It will add OceanWP Settings MetaBox in your custom post types in the edit custom post types in the code.

    Next step:

    If you want to edit the file, you must write your function to fetch a template using that custom post type.

    For example, “Gallery” is a custom post type:
    step1 — Copy partials/single folder under child theme and rename the ‘single’ folder to “gallery”.
    step2 — Now copy the singular.php file into your child theme and add the below code after the latest elseif.

    elseif ( is_singular( 'gallery' ) {
         get_template_part( 'partials/gallery/layout' );
    }

    step3 — Then go to the modified file under the gallery folder as per your need.

    After passing the above steps, you can manage your custom post type in Customize > Blog > Single Post (Settings will have shared and standard options.).

    I hope that helps.
    Best Regards

    Thread Starter Jon Tillman

    (@tillmanj)

    Hi @skalanter,

    Thanks for the help. I had already added the Settings MetaBox, and all of the options are set to Default.

    After reading your reply, I added the following to the singular.php and made the dummy templates under /partials/

    } elseif ( is_singular( 'myCPT' )) {
         get_template_part( 'partials/myCPT/layout' );

    However, the settings in Customize > Blog > Single Post still do not apply to my CPTs. Perhaps it is because I built my CPT templates with Elementor? Do they need to be saved under Theme Panel > My Library in order for this to work? That doesn’t seem reasonable, but I am at a loss here to understand what I am missing.

    Hello @tillmanj,

    However, the settings in Customize > Blog > Single Post still do not apply to my CPTs. Perhaps it is because I built my CPT templates with Elementor?

    Yes, it could be. If you created the template with Elementor, all customization will be influenced by Elementor, not the child theme code.

    Do they need to be saved under Theme Panel > My Library in order for this to work?

    I’m afraid that’s not possible; you should use the pure PHP files on the child theme to work fine on your website. Of course, in this case, Elementor template is working fine too.

    Best Regards

    Thread Starter Jon Tillman

    (@tillmanj)

    Yes, it could be. If you created the template with Elementor, all customization will be influenced by Elementor, not the child theme code.

    But the elementor template I built for the regular post doesn’t have this problem. It looks like this might be a wp_core Customizer problem.

    Thread Starter Jon Tillman

    (@tillmanj)

    Thinking about another way to achieve the same thing: How would I go about adding things like the OceanWP Social Share, Prev/Next, RelatedPosts to my Elementor templates?

    Hello @tillmanj,

    – This can’t be done for CPT; you must do it manually and with your own codes. You can use our single post template (copy/paste) to load it on your CPT, and you can manually adjust the order.

    – Elementor templates cannot do this unless you have the corresponding widgets to build something like that.

    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How To Apply Settings from “Customize” to CPTs’ is closed to new replies.