WordPress Developer Ukraine, Kyiv
WordPress add_post_type_support(): Add or Remove Features from Any CPT at Runtime

WordPress add_post_type_support(): Add or Remove Features from Any CPT a ...

add_post_type_support(): add or remove features of any post type What a post type offers in the editor (title, editor, excerpt, featured image, comments, revisions, custom fields) is defined by its “supports”. For your own post types you set them in register_post_type(); for post types of core and plugins, add_post_type_support() and remove_post_type_support() change them later. Supports…
Register a custom post type in WordPress the right way

Register a custom post type in WordPress the right way

Register a custom post type in WordPress the right way WordPress has two built-in content types, posts and pages. As soon as a site needs structured content of another kind (portfolio items, events, team members, properties), putting it into posts with custom fields gets messy: the blog list mixes articles with team profiles, the editor…
Query posts by custom taxonomy term in WordPress

Query posts by custom taxonomy term in WordPress

Query posts by a custom taxonomy term in WordPress Categories and tags are the built-in taxonomies, but most projects also register their own: genre, location, brand. Sooner or later you need all posts of one term: portfolio items of one project type, products of one brand, the latest articles in a genre. The tool for…
Disable block editor for specific post types in WordPress

Disable block editor for specific post types in WordPress

Disable the block editor for specific post types The block editor is a good fit for articles and landing pages, but not for every post type. Testimonials, team members or events often consist of a few structured fields (ACF or meta boxes) and a short text, and for editors who fill in dozens of them…