Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'breadcrumb_trail_items', 'my_breadcrumb_trail_items', 10, 2 );
- function my_breadcrumb_trail_items( $items, $args ) {
- if ( is_singular( 'post' ) ) {
- $items = array_splice( $items, 0, -2 );
- $items[] = '<a href="' . home_url() . '/recent-posts/" title="Recent post" rel="home" class="trail-begin">' . Posts . '</a>';
- $items[] = '<a href="' . get_year_link( get_the_time( 'Y', $post_id ) ) . '" title="' . get_the_time( esc_attr__( 'Y', 'breadcrumb-trail' ), $post_id ) . '">' . get_the_time( __( 'Y', 'breadcrumb-trail' ), $post_id ) . '</a>';
- $items[] = get_the_title();
- }
- return $items;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement