Skip to content

Commit

Permalink
Merge pull request #100 from amimoto-ami/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
wokamoto authored Jul 14, 2022
2 parents 0a40543 + 76e56b8 commit f34397b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion classes/WP/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,13 @@ public function get_the_post_type_archive_links() {
}
$post = $this->post;
$url = $this->parse_url( get_post_type_archive_link( $post->post_type ) );
if ( is_wp_error( $url ) ) {
$url = false;
}
$home_url = $this->parse_url( home_url() );

$links = array();
if ( trailingslashit( $home_url ) !== $url ) {
if ( $url && trailingslashit( $home_url ) !== $url ) {
$links[] = $url . '*';
}

Expand Down

0 comments on commit f34397b

Please sign in to comment.