Yoast Breadcrumbs to Shortcode?
-
I’d like to integrate the Yoast Breadcrumbs plugin into my WP site by selectively including it on some blog posts, where I want the user to see the breadcrumb tail.
Is it possible to turn this default PHP snippet into a shortcode?
<?php if ( function_exists('yoast_breadcrumb') ) { $breadcrumbs = yoast_breadcrumb("","",false); } ?>
The theme I’m using has a shortcode file and below is an example of one of the codes.
function phi_lightbox( $atts, $content = null ) { extract(shortcode_atts(array( 'title' => '', 'href' => '' ), $atts)); return '[raw]<div class="image-wrap portfolio"><a href="'.$href.'" rel="prettyPhoto" title="'.$title.'"><span class="zoom"></span>'.$content.'</a></div>[/raw]'; } add_shortcode('lightbox', 'phi_lightbox');
Thank you for your help!
- The topic ‘Yoast Breadcrumbs to Shortcode?’ is closed to new replies.