Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save StewartChamberlain/6131913 to your computer and use it in GitHub Desktop.
Save StewartChamberlain/6131913 to your computer and use it in GitHub Desktop.
<?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