WordPress Developer Ukraine, Kyiv
WordPress get_theme_mod vs get_option: When to Use Theme Mods and When to Use the Options API

WordPress get_theme_mod vs get_option: When to Use Theme Mods and When t ...

get_theme_mod() or get_option(): where to store settings WordPress has two places for settings. Theme mods (get_theme_mod(), set_theme_mod()) belong to the active theme and are stored together in one option per theme. Options (get_option(), update_option()) belong to the site and stay when the theme changes. Choosing the wrong one means settings that disappear after a theme…
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…