Skip to content

Commit

Permalink
Update breadcrums to plural name
Browse files Browse the repository at this point in the history
Changed to plural name so when showing an archive page (of all the posts in a post type for example) it makes more sense.
  • Loading branch information
patphg committed Oct 23, 2023
1 parent fbb1282 commit 9141832
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 9141832

Please sign in to comment.