Can the "Post Settings" meta input be added to custom posts?

Posted in: Newspaper
Post count: 38

I have created a custom post type called hidden post. I want it to be the exact same as standard posts, but i dont want any of these posts to show up in any of the post feeds as i want to use a custom method of displaying these posts.

On the input form for standard posts there is a “Post Settings” box that lets me set the template, add review scores etc. How can i add this to my custom posts?

Post count: 1291

Hi,

The metaboxes are set here – http://screencast.com/t/bMkfuzvj – you could change the template used for custom post types.

Thank you!

Post count: 38

Thanks for the image it was very helpful. I was able to get the input fields to show up on the post form, but the changes arent reflected on the output of the post. The changes are getting saved as the chosen option is still present. Any idea what i need to do to make the template reflect on the output of the custom post?

On a side note, i dont want to directly edit the theme as this makes things difficult in the future if the theme gets an update. I was able to make the meta boxes display using a custom plugin. IF anyone needs this in the future i used the following code to achieve the desired functionality without needing to edit the theme.

add_action('init', 'register_theme_metaboxes', 10000);
function register_theme_metaboxes() {
include_once get_template_directory() . '/includes/wp_booster/wp-admin/external/wpalchemy/MetaBox.php';
new WPAlchemy_MetaBox(array(
'id' => 'td_post_theme_settings',
'title' => 'Post Settings',
'types' => array("faq", "bg-post"),
'priority' => 'high',
'template' => get_template_directory() . '/includes/wp_booster/wp-admin/content-metaboxes/td_set_post_settings.php',
));
}

Post count: 1291

Hi,

Unfortunately some of the settings will not work, ex. changing the post template, you have to build a template for your CPT, then modify it and add conditions to load a different template when one is selected in the post settings area. This is not a simple task so i cannot provide an easy fix, sorry. The post default settings were not designed to work with CPT, we’ll try to improve this on out future updates.

Thank you!

  • This reply was modified 11 years by Emil G.
Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.