WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Filter to add ancestors (1 post)

  1. Mark Jansen
    Member
    Posted 1 year ago #

    Hello everyboday,

    I have a question regarding the wp_seo_get_bc_ancestors filter.

    I am trying to add a parent to my colleagues page. I'm trying it as follows:

    if(is_post_type_archive('colleague')) {
    	add_filter('wp_seo_get_bc_ancestors', 'add_about_us_page');
    }
    
    function wbns_breadcrumbs()
    {
    	if ( function_exists( 'yoast_breadcrumb' ) ) {
    		yoast_breadcrumb( '<div class="content-wrap clearfix breadcrumb">', '</div>' );
    	}
    }
    
    function add_about_us_page( $breadcrumb_array ) {
    	$breadcrumb_array[] = 69;
    	return $breadcrumb_array;
    }

    But somehow it seems the entire filter is not doing anything. It doesn't return anything. Anyone that can give me a kick in the right direction?

    Thanks.

    Regards,

    Mark

    http://wordpress.org/plugins/wordpress-seo/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic