9

The mentioned Post Types deal specifically with The Customizer. Custom CSS Post Type The custom_css post type is used to store all themes "Custom CSS" content found in The Customizer under Additional CSS. Each theme gets it's own post ( whenever the Additional CSS is saved ) with the CSS stored as post_content. Then only the active theme's post is used ...


9

I found out that get_post_types_by_support() seems to be the solution to get the desired result: $post_types = get_post_types_by_support(array('title', 'editor', 'thumbnail')); The above will return post, page and any custom post type that supports title, editor and thumbnail. Since this will also return private post types, we could loop through the list ...


4

get_post_types() accepts an array of arguments to match the fields of a post type object. So, you could do something like this (not tested): $post_types = get_post_types(array( 'public' => true, 'supports' => array( 'editor', 'title', 'thumbnail' ) ), 'objects'); Unfortunately, you can not set someting like "exclude" in this function, and also ...


3

add_action('init', 'init_remove_support',100); function init_remove_support() { $post_type = 'your post type'; remove_post_type_support( $post_type, 'editor'); } Add this to your themes functions.php and it should take care of it. cheers :)


2

As I noted on a comment and @toscho wrote in his answer, your code works if used after wp_loaded hook. The reason why it works for core post types if used on earlier hooks is WordPress register core post types 2 times: first time just after 'mu_plugins_loaded' hook and then again on 'init' hook (reference). That said, if you want to use a solution that make ...


2

Use 'supports' => [ 'title', 'editor', 'thumbnail' ] – different values, not keys. If we look into register_post_type(), we find these lines: if ( ! empty( $args->supports ) ) { add_post_type_support( $post_type, $args->supports ); unset( $args->supports ); } elseif ( false !== $args->supports ) { // Add default features ...


1

While the post type can add support for post formats using 'supports' or add_post_type_support(), it's up to the theme to say which formats will actually have an impact on the front end. Example: add_theme_support( 'post-formats', array( 'aside', 'gallery' ) );.


1

Couple of things to note; one's a WordPress issue, the other an SQL issue: For WordPress, instead of editing the plugin files directly, you should use the 'getarchives_where' filter it provides, and change the query there. For SQL, in order to query for multiple post types, you need a conditional statement in the query, so looking for both 'privacy' and '...


1

Post types are registered on wp_loaded or init – after plugins and the theme are loaded. Searching in $_wp_post_type_features list on plugins_loaded is too early. Be also aware that variable might change in the future. In WordPress, where almost everything is global, pseudo-private variables are marked with a leading underscore. Read that as a sign not to ...


1

I found an alternative approach. There is a unique class in body tag for each post type. e.g for portfolio post type i can use the CSS code something like mentioned below to hide the extra option. .post-type-portfolio #post-format-audio, /* for radio button itself */ .post-type-portfolio .post-format-audio /* for option label */ { display: none; } ...


1

When you register post type, you can choose what support you need. For Example: function codex_custom_init() { $args = array( 'public' => true, 'label' => 'Books', 'supports' => array( 'title', 'editor' ) ); register_post_type( 'book', $args ); } add_action( 'init', 'codex_custom_init' ) In this way you will create post type Books only ...


Only top voted, non community-wiki answers of a minimum length are eligible