Support » Plugin: Yoast Breadcrumbs » [PATCH] Pass overrides to yoast_breadcrumb()

  • I have breadcrumbs showing in a couple of places and some need to be displayed a bit differently to others. The yoast_breadcrumb() function doesn’t currently let you override on the fly so I wrote a little patch to allow it to.


    function yoast_breadcrumb($prefix = '', $suffix = '', $display = true) {
    	global $wp_query, $post;
    	$opt = get_option("yoast_breadcrumbs");


    function yoast_breadcrumb($prefix = '', $suffix = '', $display = true, $opt_overrides=array()) {
    	global $wp_query, $post;
    	$opt = array_merge(

    As an example of usage this lets me use:

    		yoast_breadcrumb('<li>','</li>', false, array(
    			'sep' => '</li><li>'

    to show a standard HTML list.

  • The topic ‘[PATCH] Pass overrides to yoast_breadcrumb()’ is closed to new replies.