Hi guys and girls,
In topic https://kriesi.at/support/topic/show-tags-in-portfolio/ you explained me how I could show tags in portfolio with links to the corresponding tag archive.
As far as I know it worked properly before. However, now the tag links don’t link to the corresponding tag archive anymore.
I recently updated Enfold tolatest version. Could that perhaps have caused this problem?
How can I solve it in order to link the tags again to the corresponding link archive?
Thanks & regards,
Monique
Hey Monique,
Thank you for using Enfold.
Please edit the shortcode, look for this line:
$the_tags = get_the_tags( $post->ID , 'portfolio_entries');
Replace it with:
$the_tags = get_the_tags( $post->ID );
Best regards,
Ismael
Hi Ismael,
Thank you for your reply.
Sorry to say that after changing the code the tag links still don’t link to the tag archive.
Any other solution for this please?
Regards,
Monique
Hi,
Please post the login details in the private field. We would like to check it.
Best regards,
Ismael
Hi Ismael,
Please find below.
Regards,
Monique
Hi,
Thank you for the update. We modified the code in the functions.php file. Please remove browser cache before checking the page.
function avs_show_portfolio_tags_func() {
global $post;
$the_tags = get_the_tags( $post->ID );
$output = '';
foreach($the_tags as $tag) {
$taglink = get_tag_link($tag->term_id);
$output .= '<span class="portfolio_tag"><a href='.$taglink.'>'.$tag->name.' </a></span>';
}
return $output;
}
add_shortcode('portfolio_tags', 'avs_show_portfolio_tags_func');
Best regards,
Ismael
Hi Ismael,
Wow great! Thanks a lot!
Can you flag this topic as closed please?
Regards,
Monique