Custom meta box repeated field

If looks like you are using CMB (Custom-Metaboxes-and-Fields-for-WordPress) to create your create metaboxes. CMB is already supplying a option to group and repeat meta box that you can use. You can check this link As far as your code it is concern if suppose it should go like this: function dikka_cmb_meoxes( array $meta_boxes ) { … Read more

problem with updating metabox of upload image

I have no time to write at your code, but with your help works for me function wms_add_headerimage_cb( $post ){ //campuri $values = get_post_custom( $post->ID ); $headerpageimage = isset( $values[‘headerpageimage’][0] ) ? esc_attr( $values[‘headerpageimage’][0] ) : ”; $img_src = wp_get_attachment_image_src( $headerpageimage, ‘medium’ ); wp_nonce_field( ‘allpages_meta_box’, ‘allpages_meta_box_nonce’ ); ?> <p> <img id=”headerpage_image” src=”https://wordpress.stackexchange.com/questions/182634/<?php echo $img_src[0] ?>” … Read more

Custom meta box using OOP way doesn’t save data

You method iam_user_can_save is incorrectly used as you are returning nothing to check in that method. Try this (not sure what behaviour you really want, the following code is just a working example from your code): public function iam_user_can_save( $post_id, $nonce ){ // Checks save status $is_autosave = wp_is_post_autosave( $post_id ); $is_revision = wp_is_post_revision( $post_id … Read more

Custom Upload Adds Ghost File

I’ve modified your code a little to check that the post type is a page, that the current user can edit that page, verify the nonce and verify the inserting attachment functions. The resulting code is working. It seems that don’t checking the post type could be the reason of the issue. Also, you don’t … Read more

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