How To: Execute Shortcodes in Genesis Breadcrumbs

We usually use shortcodes to display dynamic content in WordPress.

In WordPress, shortcodes can’t be executed at some places without overriding the default function.

I had this issue recently with my site built on the Genesis Framework.

I added a dynamic current year shortcode to my post’s title, and it showed up as it is without getting executed.

I got it figured out and below is the solution!

Execute Shortcodes in Genesis Breadcrumbs

Simply paste the code given below to your theme’s functions.php file and save it.

/* Execute shortcodes in Genesis Breadcrumbs */
add_filter( 'genesis_single_crumb', 'do_shortcode' );

Don’t forget to clear cache after saving the file to see the result. Cheers!

Leave a Comment

Your email address will not be published. Required fields are marked *

Share via
How To: Execute Shortcodes in Genesis Breadcrumbs
Scroll to Top
Send this to a friend