Articles of post type support

hide default post body field in backend

Is there a easy non-css-hacking way to hide the default post body field in the dashboard? I simply want to have the title field and some adv. custom fields but remove the default post body field.

Adding `supports` array to WordPress custom post type

I am trying to add the supports parameter to my custom post type but it is not working and renders the editing page blank: add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘my_campaigns’, array( ‘labels’ => array( ‘name’ => __( ‘Campaigns’ ), ‘singular_name’ => __( ‘Campaign’ ) ), ‘supports’ => array( ‘title’ => true, ‘editor’ […]

Querying for multiple post types in SQL

My site is using a plugin for displaying an archive widget. It only displays the ‘post’ post-type. I currently have three different post-types. Looking through the code I found: $where = apply_filters( ‘getarchives_where’, “WHERE post_type = ‘post’ AND post_status = ‘publish’ AND post_date <= now()” ); It seemed like a easy fix. First I changed […]

Filter post_type thumbnail in Search result

it’s my first question on Stack network so let me know if something wrong in the use of this. I have a theme with these pieces of code: /** * Get the Featured image URL of a post * @global object $post * @param int $post_id * @return string */ function kleo_get_post_thumbnail_url( $post_id = null […]

Taxonomies relations

I am currently working on my first WP site and struggeling with something. My websites should allow the admins nor moderators to upload tutoring videos related to series. I want that each series will be related to “lesson category”. For example, there will be a “Mathematics” category and under this category the moderators should be […]

Registering different Post Formats for Blog Post and CPT

I’m using following code to register post formats for my blog posts … add_theme_support( ‘post-formats’, array( ‘gallery’, ‘video’, ‘audio’ ) ); Now, i want to add post formats support for my CPT ‘Portfolio’ too, but using different set of post formats. Using this code will add post format support for my CPT … add_post_type_support( ‘portfolio’, […]

wp_list_filter() and supports

I’m testing the function wp_list_filter(), basically I want to know if post_type has some specific feature before making stuffs. So I end up with this: public static function get_post_types_with_support( $feature ) { global $_wp_post_type_features; $post_types = wp_list_filter( $_wp_post_type_features, array( $feature => 1 ) ); return $post_types; } The problem is I do not understand why […]

What are custom_css and customize_changeset used for?

A fresh wordpress install has the following post types: Post (Post Type: ‘post’) Page (Post Type: ‘page’) Attachment (Post Type: ‘attachment’) Revision (Post Type: ‘revision’) Navigation Menu (Post Type: ‘nav_menu_item’) Custom CSS (Post Type: ‘custom_css’) Changesets (Post Type: ‘customize_changeset’) https://codex.wordpress.org/Post_Types doesn’t address what the final two are used for. Could anyone explain?