Activate Breadcrumbs
Latest update: September 14, 2021 | Reading time: 2 to 3 minutesOne way you can safely add breadcrumbs to a site with Healthflex activated is by using the Yoast SEO plugin and a minor addition in the theme’s files. You will need access to the files of the installation via FTP. For safety, keep a copy of the site before making any changes.
Here is a workaround we have tested with the more recent version of Healthflex and appears to work as expected.
1. Add and activate the Yoast SEO plugin on your site.
2. Edit the header.php file of the theme. It is located in /wp-content/themes/healthflex. If you need to make this modification permanent, we recommend using a child theme because every modification on the theme files will be overwritten in the next theme update. If you are using a child theme make a copy of the original header.php file and place it in /wp-content/themes/healthflex-child. Then, edit the file and paste the following lines at the bottom of the file.
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); } ?>
Save the file and exit.
3. Go to Dashboard > Yoast SEO> Search Appearance > Breadcrumbs and choose the configuration you need for your site. Save changes. You can also find the Breadcrumbs settings on Dashboard > Appearance > Customize > Yoast SEO Breadcrumbs.
At this point, the breadcrumbs should have been activated on the site.
Some extra steps:
4. If you can see the breadcrumbs on a page you don’t need to, edit the page and edit the page settings (on the page builder are located on the top right under the Gear icon). Add the following lines:
#breadcrumbs { display:none; }
Save changes and Update the page. At this point, the breadcrumbs should have been removed from the page.
5. Do you need to give a special styling to the breadcrumbs? Use the #breadcrumbs id to add a property. Example: for changing the font-weight, the spacing between letters, and the size of the breadcrumbs, add the following lines to Dashboard > Appearance > Customize > Additional CSS:
#breadcrumbs { font-size: 1.1em; font-stretch: extra-expanded; font-weight:600; }
Give it a try!
VALID FOR ALL VERSIONS OF HEALTHFLEX