Non Object Notice Error – How to fix please

Replace your code with as mentioned below: public function admin_body_class($classes) { global $wpdb, $post; $screen = get_current_screen(); $status=”parent-“; if( isset( $post->post_parent ) && $post->post_parent > 0 ) { $status=”child-“; } $classes .= ‘ ‘ . $status . $screen->post_type; return $classes; }

How do I add custom fields to the “Edit page” admin screen?

In you code you are passsing ‘Page’ as object types. Please update your code as follows: $cmb = new_cmb2_box( array( ‘id’ => $prefix . ‘banner_media’, ‘title’ => __( ‘Banner media’, ‘foo’ ), ‘object_types’ => array( ‘post’ , ‘page’ ), ‘context’ => ‘advanced’, ‘priority’ => ‘default’, ) ); When set object types to Post and Page … Read more

I want to know if it’s good for SEO [closed]

The /wp-admin/ajax.php file should not be locked – it is used to power all AJAX functionality on the site. Your robots.txt file specifically instructs search engine spiders (like Google) to allow access to /wp-admin/ajax.php: User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Sitemap: http://example.com/sitemap.xml Either remove the Allow: /wp-admin/admin-ajax.php and keep /wp-admin/ locked (effectively disabling all AJAX … Read more

Is there ever a legitimate reason for an outsider to access wp-admin

Yes, lots of themes and plugins make use of the wp-admin/admin-ajax.php file, and some use wp-admin/admin-post.php. But beyond that there’s little to no reason to access wp-admin. Perhaps a search engine trying to determine if I’m running wordpress? Search engines don’t care so much if you are or aren’t using WordPress, you would be able … Read more

How do I unset all of the select boxes for pages

I’m not sure if I understand your problem correctly. But I think you should click on ‘x’ in every select on this page. When you do it, this select box will have no selected value any more (it will only contain placeholder saying “Select a page…”). Just look at attached image. I marked this ‘x’ … Read more