How to add categories to page editor?

You’ll need to register the category taxonomy for the page post_type with register_taxonomy_for_object_type. This does the trick: <?php add_action( ‘init’, ‘wpse34528_add_page_cats’ ); function wpse34528_add_page_cats() { register_taxonomy_for_object_type( ‘category’, ‘page’ ); }

Change headline text for post thumbnail meta box

Featured Image box is internally a meta box, added using add_meta_box (ref. edit-form-advanced.php line no. 128). As far as my research went, there is no filter applied to the meta box title (ref. template.php line no. 846). Hence you cant change the metabox title using a filter. Though you can try printing the contents of … Read more

retrieve meta key when checkbox is used

You need to add the third parameter to get_post_meta(), so get_post_meta( get_the_ID(), ‘home’, true ) should at least get you closer. Just a note, in future, try doing a var_dump() or print_r() on the variable(s) in the condition that are evaluating in an unexpected manner, if you’d done that here you would have seen that … Read more

Automatically add a tag according to custom metadata

I accidentally found this question searching for something similar, and I liked your approach, so I improved your code a bit. I updated the action hook so it’s being triggered on save AND update. Added the wp_remove_object_terms to be able to switch back ( toggle ) custom meta box value ( in this case check-box … Read more

Taxonomy as checkboxes

You need to make sure you cast all the terms as integers. Passing in strings will compare the id’s to the slugs, and end up creating new terms with the ids as the name. Edit Specifically, alter these two lines as follows (note the intval): wp_set_object_terms( $post_id, intval( $term ), $field[‘id’] ); … wp_set_object_terms( $post_id, … Read more

Display oembed in repeatable metaboxs using CMB2

So, to answer my own question. In the functions/backend code I made a mistake with this line: ‘id’ => $prefix . ‘media_embed’, In a repeater field it it doesn’t need the prefix and as that is defined in the parent and so it should be: ‘id’ => ‘media_embed’, And for the front end this line: … Read more