I’ve installed this plugin and added a custom post type. It was displayed properly, but then whrn trying to unistall it, it also deleted the woocommerce custom post type for products. And at some point it stoped showing the custom type, that i created before.
I turned debug mode on to see what’s the problem, i get the following errors:

*Notice: Undefined index: post_type in /wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php on line 132 if(!$post_type)

Notice: Undefined index: post_type in /wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php on line 134 if(!$post_type)

Notice: Undefined variable: post in /wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php on line 137 $post_type =get_post_type( $post );

Notice: Trying to get property of non-object in /wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php on line 141 $lbl = $row->menu_label;

Notice: Trying to get property of non-object in /wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php on line 142* $row_menu_id = $row->menu_id;

function parent_menu_header() {
global $wp_query,$wpdb;
$post_type = $wp_query->query_vars['post_type'];
if(!$post_type) {
    $post_type = $_REQUEST['post_type'];
}
if(!$post_type) {
    $post_type =get_post_type( $post )  ;
}
$row = $wpdb->get_row("select * from ".$wpdb->prefix."scck_content_type where   product_machine_name = '$post_type'");
$lbl = $row->menu_label;
$row_menu_id = $row->menu_id;
$id = "toplevel_page_cck-main-".$row_menu_id;
if($post_type) {
?>

Any ideas on how i can fix this? I’m pretty stuck with this right now, any help will be really appreciated.

Read more here: Notice: Undefined index: post_type - Simple Custom post type custom field plugin


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , , , , ,

Wordpress related questions and answers: