Last active
March 7, 2018 18:54
-
-
Save ryantownley/de24f4b4a2d06632d8976db354a88e74 to your computer and use it in GitHub Desktop.
Add breadcrumbs to Genesis Portfolio Pro archives and single pages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Do NOT include the opening php tag | |
//* Add the breadcrumb navigation to portfolio archives and single pages | |
add_action( 'genesis_before_loop', 'add_portfolio_breadcrumb' ); | |
function add_portfolio_breadcrumb() { | |
if ( get_post_type( $post_id ) == 'portfolio' || is_post_type_archive( 'portfolio' ) || is_tax( 'portfolio-type' ) ) { | |
add_action( 'genesis_before_loop', 'genesis_do_breadcrumbs', 15 ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's the link to the portfolio, if that helps
http://dougschumacher.com/portfolio-type/portfolio/