Set post title to same value as a tow meta box

Why do you need to remove the title? Generally it’s a bad idea, as the title generates the permalink, can’t think of any scenario where it would be necessary. Anyways, here is some code that looks like it does what you need: function add_custom_title( $data, $postarr ) { if($data[‘post_type’] == ‘myposttype’) { if(empty($data[‘post_title’]) { // … Read more

Error in get post by met_key

I don’t really understand this sentence– “It must get me only all post from unit post type that in unit type post type,”– and honestly the query looks correct to me, but I would suggest trying a meta_query and specifying the type, as well as disabling sticky post juggling. If you have 6 or more … Read more

Issue with file paths after porting metabox from main theme to child theme

I found the answer my self, the issue had to do with a line requesting the content of the metabox (as expected). The line: ‘template’ => get_template_directory() . ‘/lib/metaboxes/custom_textbox.php’, should have been changed to: ‘template’ => get_stylesheet_directory() . ‘/lib/metaboxes/custom_textbox.php’, According (to the WordPress Codex) will get the path for the main theme. If you want … Read more