Skip to content

Commit

Permalink
- instead of getting the post type of the queried object, if it's the…
Browse files Browse the repository at this point in the history
… post's page we want to get the post_type_object of the 'post' post type
  • Loading branch information
jasonbahl committed Apr 19, 2023
1 parent 3e0fec6 commit 87e19fb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Data/NodeResolver.php
Expand Up @@ -201,8 +201,7 @@ public function resolve_uri( string $uri, $extra_query_vars = '' ) {
return null;
}

/** @todo resolve to an Archive Type. */
$post_type_object = get_post_type_object( $queried_object->post_type );
$post_type_object = get_post_type_object( 'post' );

if ( ! $post_type_object ) {
return null;
Expand Down

0 comments on commit 87e19fb

Please sign in to comment.