CSS styling not working in a custom metabox

The metabox div gets an ID of ‘meta_’ + your metabox ID, thus: Sorry, that was me looking at my own metaboxes, forgetting that I actually prefix them like that to differentiate the container from elements within the container 🙁 Let’s work through your code and see if we can find the answer. First, your … Read more

How do I allow Authors and Contributors to use the metabox

Maybe they are just disabled? I’ve already seen a lot of people tripping over this one: On the top right of the edit screen you can see “Screen Options”. If you open this section you can enable and disable meta boxes. Maybe yours is deactivated? Source: Screen Options

CPT Template Option to Top

You could hook into theme_{$post_type}_templates and add an identical “default” option at the end: add_action(‘theme_page_templates’, ‘wpse_296283_theme_page_templates’); function wpse_296283_theme_page_templates($post_templates){ $post_templates[‘default’] = “Default Template”; return $post_templates; } Then you’d hide the first one with CSS: add_action(‘admin_head’ ‘wpse_296283_admin_head’); function wpse_296283_admin_head(){ ?> <style>#page_template option:first-child {display: none;}</style> <?php }

Using CMB2 Plugin to create text_date metabox (datepicker) How do I save multiple dates? [closed]

In CMB2 you can use the group type to create a repeating fields, then inside the group, you declare the text_date type. Let’s say you have an Events where you set multiple dates. $events = new_cmb2_box([ ‘id’ => ‘events_metabox’, ‘title’ => __(‘Events’, ‘text_domain’), ‘object_types’ => …, ‘show_on’ => …, … ]); $events_group_id = $events->add_field([ ‘id’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)