[Plugin: WordPress SEO by Yoast] Tiny feature request with code to implement – breadcrumb category p
-
it is again regarding my problem that i cannot set, which categories will be shown in breadcrumb (http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-breadcrumb-category-precedence?replies=1)
i have one tiny change for you of class-breadcrumbs.php which would solve it:
row 174, change$terms = wp_get_object_terms( $post->ID, $main_tax );to
$terms = wp_get_object_terms( $post->ID, $main_tax, array('orderby' => 'term_order') );I guess that default “by name” ordering is meaningless for practicaly everyone.
Or if you want to make it even better – put there some filter, so users could define their own wp_get_object_terms args property, so something like$terms_args = apply_filters('yoast_terms_args', array()); $terms = wp_get_object_terms( $post->ID, $main_tax, $terms_args);so we could filter it as we want
The topic ‘[Plugin: WordPress SEO by Yoast] Tiny feature request with code to implement – breadcrumb category p’ is closed to new replies.