Skip to content

Commit

Permalink
Merge pull request #2266 from patphg/breadcrumb-plurals
Browse files Browse the repository at this point in the history
Update breadcrums to plural name
  • Loading branch information
chrisblakley authored Oct 23, 2023
2 parents fbb1282 + 9141832 commit 04a8fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/Functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1528,7 +1528,7 @@ public function breadcrumbs($options=array()){
}
} elseif ( !is_single() && !is_page() && get_post_type() !== 'post' && !is_404() ){
$post_type = get_post_type_object(get_post_type());
echo $data['before'] . '<span itemprop="name">' . $post_type->labels->singular_name . '</span><meta itemprop="position" content="' . $position . '" />' . $data['after'];
echo $data['before'] . '<span itemprop="name">' . $post_type->labels->name . '</span><meta itemprop="position" content="' . $position . '" />' . $data['after'];
} elseif ( is_attachment() ){ //@TODO "Nebula" 0: Check for gallery pages? If so, it should be Home > Parent(s) > Gallery > Attachment
if ( !empty($post->post_parent) ){ //@TODO "Nebula" 0: What happens if the page parent is a child of another page?
echo '<li itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="' . get_permalink($post->post_parent) . '" itemprop="item"><span itemprop="name">' . strip_tags(get_the_title($post->post_parent)) . '</span></a><meta itemprop="position" content="' . $position . '" /></li> ' . $data['delimiter_html'] . ' ' . strip_tags(get_the_title());
Expand Down

0 comments on commit 04a8fd8

Please sign in to comment.