Script dependencies for post.js

Because of the dependency handling built into the script registration system you should only need … wp_enqueue_script(‘post’); … to load all of the required scripts, which is exactly what the Core does. But just loading the scripts isn’t going to make everything work. That form is actually loaded by wp-admin/post.php, which requires wp-admin/admin.php which includes … Read more

Problem with adding exta field in metabox in custom post type

You didn’t retrieve your 2 values in the save_post action. You need to get $_POST[’freebie-demo’] (it’s ok for it) and $_POST[‘freebie-downurl’] If you want an array post meta value based, you can do something like that : // Sanitize user input. $de_url[‘name’] = sanitize_text_field( $_POST[‘freebie-demo’] ); $de_url[‘url’] = esc_url($_POST[‘freebie-downurl’]); // Update the meta field in … Read more

Remove border on custom meta box

The postbox class is hardcoded into the do_meta_boxes() function which is responsible for rendering meta boxes, and is not customizable via filters. Thus, I guess your best bet would be removing it using javascript. This should do it: functions.php add_action(‘admin_init’, ‘wpse_87339_admin_init’); function wpse_87339_admin_init() { wp_enqueue_script(‘wpse_87339_admin’, get_stylesheet_directory_uri() . ‘/js/admin.js’, array(‘jquery’)); } js/admin.js jQuery(document).ready(function($) { // Remove … Read more

How do I migrate meta boxes from the Classic Editor to the “side area” in Gutenberg Editor?

The area is called the same. Just side, for sidebar. I found help for migration here: https://wordpress.org/gutenberg/handbook/extensibility/meta-box/ The PHP, for setting up your meta field to migrate, code needs some tweaks. First set in following as new argument on your meta field setup array( ‘__block_editor_compatible_meta_box’ => false, ) let’s you decide on next load of … Read more

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