Thanks for the link, @jenxi — that’s been a big help!
To match the homepage widget styling for the Breakthrough Pro theme, you can try this code instead of anything you’ve added already (it’s the same as above except for the first add_action
line):
add_action( 'genesis_before_while', 'sp_amend_portfolio_archive' );
/**
* Add the portfolio post type links under the portfolio title.
*/
function sp_amend_portfolio_archive() {
if ( is_post_type_archive( 'portfolio' ) ) {
add_action( 'genesis_after_entry_content', 'sp_add_type_to_portfolio', 9 );
}
}
/**
* Output portfolio post type links.
*/
function sp_add_type_to_portfolio() {
$terms = get_the_term_list( get_the_ID(), 'portfolio-type' );
if ( ! $terms ) {
return;
}
genesis_markup(
array(
'open' => '<p %s>',
'close' => '</p>',
'context' => 'entry-meta',
'content' => genesis_strip_p_tags( do_shortcode( "[post_terms taxonomy='portfolio-type' before='']" ) ),
)
);
}
You’ll also need to add this to your theme’s style.css
or at Appearance → Customize → Additional CSS if you want the terms to appear uppercase on the portfolio archive, like they do on the homepage:
.genesis-pro-portfolio.post-type-archive .entry-header .entry-meta {
text-transform: uppercase;
}