Created
August 1, 2013 14:30
-
-
Save StewartChamberlain/6131913 to your computer and use it in GitHub Desktop.
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_filter ( 'genesis_home_crumb', 'sc_breadcrumb_home_portfolio_link' ); | |
/** | |
* Modify Home link on portfolio custom post type | |
* | |
*/ | |
function sc_breadcrumb_home_portfolio_link( $crumb ) { | |
if ( is_post_type_archive('portfolio') || 'portfolio' == get_post_type() ) | |
return preg_replace('/href="[^"]*"/', 'href="http://example.com/portfolio"', $crumb); | |
else | |
return $crumb; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment