How can I show the name of the store (i.e. Bamboo by Panda) instead of the slug name of the shop owner?

There are 2 ways to customize it:

  1. Using Yoast Seo plugin: You can click on Plugins -> Add New -> Install Yoast SEO plugin. When this plugin is enabled, the plugin’s breadcrumb will be used instead of Dokan’s Breadcrumb.
  2. Put the following code to functions.php of Wilcity Child Theme

 


add_filter('woocommerce_get_breadcrumb', function($crumbs){
	if ( !function_exists('dokan_is_store_page') || ! dokan_is_store_page() ) {
		return $crumbs;
	}

	if ( function_exists( 'yoast_breadcrumb' ) && WPSEO_Options::get( 'breadcrumbs-enable' ) ) {
		unset( $crumbs );
		return;
	}

	$custom_store_url = dokan_get_option( 'custom_store_url', 'dokan_general', 'store' );
	$author      = get_query_var( $custom_store_url );
	$seller_info = get_user_by( 'slug', $author );

	$crumbs[1]   = array( ucwords($custom_store_url) , site_url().'/'.$custom_store_url );
	$crumbs[2]   = array( $seller_info->display_name, dokan_get_store_url( $seller_info->data->ID ) );

	return $crumbs;

}, 999);

Leave A Comment?