Modify breadcrumb navigation for Cream Magazine template for wordpress website
Modify breadcrumb navigation for Cream Magazine template for wordpress website
First find the right breadcrumb style
In order to find a suitable control plug-in for the breadcrumb navigation bar, I used the Rank math plug-in here. The second item in the general settings is the setting of breadcrumbs.
Set the display form of the breadcrumb navigation bar according to your own needs. Save and copy the above php calling code.
Replace code:
Enter the navigation editor to find the corresponding php file:
Cream Magazine: theme-hooks.php (inc/theme-hooks.php)
Search for keywords in the file: breadcrumb
Find the corresponding website front-end display code:
<div class="breadcrumb <?php echo ( $breadcrumb_class ) ? esc_attr( $breadcrumb_class ) : ''; ?>">
<?php
switch ( $breadcrumb_source ) {
case 'yoast' :
yoast_breadcrumb();
break;
case 'rank_math' :
rank_math_the_breadcrumbs();
break;
case 'bcn':
bcn_display();
break;
default :
$breadcrumb_args = array(
'show_browse' => false,
);
cream_magazine_breadcrumb_trail( $breadcrumb_args );
}
?>
</div>
Comment out the php function in <div></div>, and paste the breadcrumb navigation call code obtained in Rank math.
<div class="breadcrumb <?php echo ( $breadcrumb_class ) ? esc_attr( $breadcrumb_class ) : ''; ?>">
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
<!--Comment out the original breadcrumbs <?php
switch ( $breadcrumb_source ) {
case 'yoast' :
yoast_breadcrumb();
break;
case 'rank_math' :
rank_math_the_breadcrumbs();
break;
case 'bcn':
bcn_display();
break;
default :
$breadcrumb_args = array(
'show_browse' => false,
);
cream_magazine_breadcrumb_trail( $breadcrumb_args );
}
?> -->
</div>
Just save it.
Post a Comment
0 Comments