Changeset 10345
- Timestamp:
- 10/02/2020 07:39:42 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions-codex.php
r10324 r10345 21 21 22 22 if ( ! is_front_page() && ! is_page('home') && ! is_404() ) { 23 24 $crumb[] = '→ ' . get_the_title( $post->ID ); 25 26 if ( !empty( $post->ancestors ) ) { 27 foreach ( $post->ancestors as $post_id ) { 28 $crumb[] = '→ <a href="' . get_permalink( $post_id ) . '">' . get_the_title( $post_id ) . '</a>'; 23 if ( is_singular() ) { 24 $crumb[] = get_the_title( $post->ID ); 25 26 if ( ! empty( $post->ancestors ) ) { 27 foreach ( $post->ancestors as $post_id ) { 28 $crumb[] = '<a href="' . get_permalink( $post_id ) . '">' . get_the_title( $post_id ) . '</a>'; 29 } 29 30 } 31 } elseif ( is_search() ) { 32 $crumb[] = esc_html( get_search_query( false ) ); 33 $crumb[] = __( 'Search Results', 'bborg' ); 30 34 } 31 35 … … 33 37 34 38 krsort( $crumb ); 35 $crumb = implode( ' ', $crumb );39 $crumb = implode( ' → ', $crumb ); 36 40 echo $crumb; 37 41 }
Note: See TracChangeset
for help on using the changeset viewer.