function breadcrumbs() { // Code if(!is_home()) { $output = '<nav class="breadcrumbs">'; $output .= '<a href="'.home_url('/').'">Home</a> <span class="divider">/</span> '; if (is_category() || is_single()) { $output .= '<a href="'.home_url('/insights/').'">Insights</a>'; if (is_single()) { $output .= ' <span class="divider">/</span> '; $output .= get_the_title(); } } elseif (is_page()) { $output .= get_the_title(); } $output .= '</nav>'; } return $output; } add_shortcode( 'breadcrumbs', 'breadcrumbs' );