Skip to content

Commit

Permalink
Update head.php (#538)
Browse files Browse the repository at this point in the history
Adds addition check around query_var lookup.
  • Loading branch information
pkevan authored Aug 21, 2024
1 parent 55cd8fe commit 27b9916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/wp-content/themes/wporg-developer-2023/inc/head.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function document_title( $parts ) {
if ( get_post_type_object( $post_type ) ) {
$parts['title'] .= " $sep " . get_post_type_object( $post_type )->labels->singular_name;
}
} elseif ( ( is_singular() || is_post_type_archive() ) && false !== strpos( $post_type, 'handbook' ) ) {
} elseif ( ( is_singular() || is_post_type_archive() ) && is_string( $post_type ) && false !== strpos( $post_type, 'handbook' ) ) {
// Add handbook name to title if relevant.
if ( get_post_type_object( $post_type ) ) {
$handbook_label = get_post_type_object( $post_type )->labels->name;
Expand Down

0 comments on commit 27b9916

Please sign in to comment.