• On my 404 pages I get the following error:

    Notice: Trying to get property ‘ID’ of non-object in /home/dogtotzs/public_html/wp-content/plugins/easy-image-gallery/includes/gutenberg-block/src/init.php on line 40

    The related function looks like this:

    function easy_image_gallery_hide( $post_id ) {
    
    	$post_types = easy_image_gallery_allowed_post_types();
    
    	$post_type  = get_post_type( $post_id );
    
    	if ( ! array_key_exists( strval( $post_type ), $post_types ) ) {
    
    		return true;
    
    	}
    
    	return false;
    
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘get property ‘ID’ of non-object’ is closed to new replies.