WordPress.org

Ready to get started?Download WordPress

Forums

Yoast Breadcrumbs
Yoast Breadcrumbs to Shortcode? (1 post)

  1. BakingandBooks
    Member
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by BakingandBooks
  • This topic is not resolved
  • WordPress version: 3.1.2