• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

Customizing breadcrumbs in Genesis Framework

Discover in this tutorial how to modify the breadcrumbs in a Genesis child theme using code.

In a previous tutorial you saw how to change the text (and separator) that appears on archive pages.

But the filter we used in that case does not allow you to customize breadcrumbs in other locations, such as in categories, author pages, searches…

So, in this tutorial we are going to see how you can customize all of them.

Snippet to customize breadcrumbs in a Genesis child theme

First of all, make sure you have breadcrumbs enabled for the pages where you want them to be displayed. You can do this from the WordPress customizer under Theme Settings > Breadcrumbs:

settings-breadcrumbs-pages-archive-Genesis

These are all the arguments you can customize in the genesis_breadcrumb_args filter:

To see this and another 839 code snippets of this website, login or subscribe here.

You see you can customize quite a few arguments:

  1. The initial text
  2. The separator
  3. Subsequent text
  4. The text that appears in
    • Author archive pages
    • Tag archive pages
    • Category archive pages
    • Date archive pages
    • CPT archive pages
    • Search pages
    • Page 404

You can modify the text of each of them to your liking.

If you only want to modify one of them, just include that argument. For example, if you want to modify the breadcrumb for the search pages you will need to add the following snippet at the end of the functions.php file:

To see this and another 839 code snippets of this website, login or subscribe here.

Conclusion

As you can see, with a few lines of code you can modify the breadcrumbs in a Genesis child theme to your liking.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

Genesis Framework PHP

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?