Tagged: categories, Portfolio, Tags
Hi guys,
Just returned from my holidays, so I might still be in “seventh heaven” and unable to see obvious things… ;-)
How can I get my portfolio categories and tags to be show on the portfolio item on the website? I have looked and looked again, but cannot find any shortcode for this in the Avia Layout Builder.
Please advise.
Thanks & regards,
Monique
Hey Monique,
Thank you for using Enfold.
Those info should display automatically if you use the default editor. If you want to display it in the portfolio item created with the advance layout builder, please follow this link: https://kriesi.at/support/topic/show-portfolio-category-on-portfolio-pages/#post-540059
Best regards,
Ismael
Hi Ismael,
I am using advance layout builder, so I followed the instructions in the thread you mentioned. It works but only partially:
1) I can only see the first category (most items have more categories).
2) Is it possible to have the categories clickable so that when visitors click on them they see an overview of all portfolio items of that category?
Thanks & regards,
Monique
Hi,
1-2.) Replace the code with this:
function show_portfolio_category_func() {
global $post;
$the_terms = get_the_terms( $post->ID , 'portfolio_entries');
$output = '';
foreach($the_terms as $term) {
$termlink = get_term_link($term->term_id, $term->taxonomy);
$output .= '<span class="portfolio_cat"><a href='.$termlink.'>'.$term->name.' </a></span>';
}
return $output;
}
add_shortcode('portfolio_category', 'show_portfolio_category_func');
Best regards,
Ismael
Hi Ismael,
Works! That’s great! A little CSS and it looks beautiful too :-)
Can you flag this topic as closed please? (Btw: can I do this myself or do you need to do that?)
Thanks & best regards,
Monique