Extend Screen Options

To change or extend the functionality of WordPress Core, WordPress relies heavily on actions and filters. I’ll assume you have basic knowledge of this, and if you don’t, you will after reading up on it in the Codex. render_screen_meta is a public method of the WP_Screen object. You can’t overwrite is by defining the function … Read more

WP Custom Fields Metabox Disappears – ACF plugin issue [closed]

ACF 5.6+ intentionally removes the custom fields metabox to improve performance when loading posts. To display the metabox, add this to functions.php in your theme: add_filter( ‘acf/settings/remove_wp_meta_box’, ‘__return_false’ ); In addition to the above code, make sure that the custom fields metabox is enabled in Screen Options at the top of a post, and that … Read more

Set default screen option for appearance -> menus

This option is stored in the wp_usermeta table with the meta_key name of metaboxhidden_nav-menus. If we hide all the boxes, this is the meta_value of the option: array( “nav-menu-theme-locations”, “add-custom-links”, “add-post”, “add-page”, “add-portfolio”, “add-category”, “add-post_tag”, “add-post_format”, “add-location” ) There is one CPT, portfolio. If we wanted for it to be always visible every time the … Read more

Disabling ‘posts’ in Appearance > Menus

We can use the register_post_type_args filter to adjust how the post post type is displayed in the backend with e.g.: add_filter( ‘register_post_type_args’, function( $args, $name ) { if( ‘post’ === $name ) { // $args[‘show_ui’] = false; // Display the user-interface $args[‘show_in_nav_menus’] = false; // Display for selection in navigation menus $args[‘show_in_menu’] = false; // … Read more

get_current_screen() inside add_action(‘admin_menu’)

I don’t know exactly what you are trying to accomplish but you seem to be dealing with meta boxes. If so there are a number of meta box specific hooks. do_action(‘add_meta_boxes’, $post_type, $post); do_action(‘add_meta_boxes_’ . $post_type, $post); do_action(‘do_meta_boxes’, $post_type, ‘normal’, $post); do_action(‘do_meta_boxes’, $post_type, ‘advanced’, $post); do_action(‘do_meta_boxes’, $post_type, ‘side’, $post); http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/edit-form-advanced.php#L165 As well as the admin_head* … Read more

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