Modify Publish Metabox location on CPT

This solution seems to work so far. add_filter(‘screen_layout_columns’, ‘one_column_on_screen_options’); function one_column_on_screen_options($columns) { $columns[‘post’] = 1; return $columns; } // Ignore user preferences stored in DB, and serve only one column layout add_filter(‘get_user_option_screen_layout_post’, ‘one_column_layout’); function one_column_layout($option) { return 1; } add_action( ‘add_meta_boxes_sliding_panel’, ‘sds_do_meta_boxes’, 0, 1 ); function sds_do_meta_boxes( $post ) { remove_meta_box( ‘submitdiv’, ‘sliding_panel’, ‘side’ ); … Read more

Custom metabox with image gallery upload that won’t attach images to post

Here is my function to save attachment in a field using acf plugin. It may helps $filename = $wp_upload_dir[‘path’].”https://wordpress.stackexchange.com/”.$img; // Check the type of file. We’ll use this as the ‘post_mime_type’. $filetype = wp_check_filetype( basename( $filename ), null ); // Prepare an array of post data for the attachment. $attachment = array( ‘guid’ => $wp_upload_dir[‘url’] … Read more

Metabox not saving values

This is my working code // Add meta box function frontpage_meta_boxes( $post ){ global $post; if(!empty($post)) $page_template = get_post_meta( $post->ID, ‘_wp_page_template’, true ); { $pageTemplate = get_post_meta($post->ID, ‘_wp_page_template’, true); if($pageTemplate == ‘page-home.php’ ) { add_meta_box( ‘frontpage_meta_box’, __( ‘Features’ ), ‘frontpage_meta_box’, ‘page’, ‘advanced’, ‘high’ ); } } } add_action( ‘add_meta_boxes_page’, ‘frontpage_meta_boxes’ ); // builds our meta … Read more

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