Save meta box data from selected dropdown list in bbpress reply form

I add a show contents part referring to a workable previous post with link https://bbpress.org/forums/topic/add-custom-text-fields-to-reply-form/. The below code can provide options for the user to selection. But the selection result could not be shown. I am not sure whether the selection result was added into metabox properly because I can not use the debug function. … Read more

Saving multiple fields (dropdown and text) in custom metabox

It looks like the variable you’re using to set the selected item is not defined in that scope. In your constructor: public function __construct() { if ( is_admin() ) { add_action( ‘load-post.php’, array( $this, ‘init_metabox’ ) ); add_action( ‘load-post-new.php’, array( $this, ‘init_metabox’ ) ); } $this->dropdown_args = [ ‘show_option_none’ => ‘- select a page -‘, … Read more

get_post_meta giving errors while creating a metabox

The error there clearly says that there’s an undefined variable (post) in your metabox callback function. So you need to define $post in your function head: // The $post variable is passed by WordPress. function diwp_post_metabox_callback( $post ) And you should also do the same to diwp_save_custom_metabox() function (which is hooked to save_post): // Here, … Read more

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