Articles on: Developers

Filter Hook: zakra_breadcrumbs_enabled

This filter is used to modify the visibility of the breadcrumbs. Enabling or disabling breadcrumbs is an option available in Customizer. You may want to alter its visibility on specific pages. This can be achieved through Page Settings in the Pro theme version. You can use zakra_breadcrumbs_enabled hook to achieve this feature in a free theme.


Example of using this filter:

To disable breadcrumbs in search page only:

function disable_breadcrumbs() {
	if( is_search() ){
	   return false;
 	}
 	else {
 	   return true;
 	}
}
add_filter( 'zakra_breadcrumbs_enabled', 'disable_breadcrumbs');

Updated on: 13/09/2019

Was this article helpful?

Share your feedback

Cancel

Thank you!