Create Shortcode for WordPress Website
post_name;
$breadcrumbs_url = '/article';
$term_obj_list = get_the_terms( $post->ID, 'type' );
$url_string = '
Home
';
foreach($term_obj_list as $term) {
$breadcrumbs_url .= '/'.$term->slug;
$url_string .= '
» '.$term->name.'
';
}
$url_string .= '
» '.$post->post_title.'
';
echo $url_string;
}
?>
Create Shortcode that we need to used in website where we need breadcrumbs
[breadcrumbs]