Notice: Undefined property: WP_Post_Type::$ID in all-in-one-seo-pack tags.php
-
I get the same error as @alicekhin.
(https://wordpress.org/support/topic/notice-undefined-property-wp_post_typeid-in-all-in-one-seo-pack-tags-php/)Warning: Undefined property: WP_Post_Type::$ID in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 932 Warning: Undefined property: WP_Post_Type::$ID in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 934 Warning: Undefined property: WP_Post_Type::$ID in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 934 Warning: Undefined property: WP_Post_Type::$ID in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 936 Warning: Undefined property: WP_Post_Type::$display_name in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 939 Warning: Undefined property: WP_Post_Type::$first_name in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 942 Warning: Undefined property: WP_Post_Type::$last_name in /var/www/html/wp-content/plugins/all-in-one-seo-pack-pro/app/Common/Utils/Tags.php on line 945When I select “mine” in the post list on the admin screen, an error is displayed.
Also, when I filter by username, I get the same error.
Username filtering is a customization added in function.php.
It doesn’t seem to matter because the error doesn’t disappear even if the user name filtering is deleted.function add_author_filter() { global $post_type; if ( 'post' === $post_type ) { wp_dropdown_users( array( 'show_option_all' => 'ユーザー一覧', 'name' => 'author', ) ); } } add_action( 'restrict_manage_posts', 'add_author_filter' );I’m adding archive.php customizations to function.php.
If you remove this customization, the error will disappear. But my WordPress needs this customization.function post_has_archive( $args, $post_type ) { if ( 'post' === $post_type ) { $args['rewrite'] = true; $args['has_archive'] = 'blog'; } return $args; } add_filter( 'register_post_type_args', 'post_has_archive', 10, 2 );How can I get rid of the error while leaving the archive.php customizations? Help me.
The topic ‘Notice: Undefined property: WP_Post_Type::$ID in all-in-one-seo-pack tags.php’ is closed to new replies.