Skip to content

Commit

Permalink
Merge pull request #3 from player0k/master
Browse files Browse the repository at this point in the history
added url for is_archive()
  • Loading branch information
moldcraft committed May 25, 2016
2 parents 380b194 + 1813910 commit cd53586
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions includes/class-breadcrumbs-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,10 @@ private function build_breadcrumbs() {
} elseif ( is_archive() ) {
$post_type = get_query_var( 'post_type' );
if ( $post_type ) {
$post_type = get_post_type_object( $post_type );
$post_type_obj = get_post_type_object( $post_type );
$archive = array();
$archive['name'] = $post_type->labels->name;
$archive['name'] = $post_type_obj->labels->name;
$archive['url'] = get_post_type_archive_link( $post_type );
$return[] = $archive;
}
}
Expand Down

0 comments on commit cd53586

Please sign in to comment.