Tagged: ,

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #813364

    Hi,

    A while ago you’ve given me advise how to show categories in portfolio (when using avia layout builder), see https://kriesi.at/support/topic/show-categories-and-tags-in-portfolio/#post-673578.

    Could you give me the same for showing tags in portfolio please?

    Thanks & regards,
    Monique

    #813872

    Hey Monique,

    Please add following code to Functions.php file in Appearance > Editor

    function show_portfolio_tags_func() {
    	global $post;
    	$the_tags = get_the_tags( $post->ID , 'portfolio_entries');
    	$output = '';
    	foreach($the_tags as $tag) {
    		$taglink = get_tag_link($tag->tag_id);
    		$output .= '<span class="portfolio_tag"><a href='.$taglink.'>'.$tag->name.' </a></span>';
    	}
        return $output;
    }
    add_shortcode('portfolio_tags', 'show_portfolio_tags_func');

    then insert [portfolio_tags] shortcode to your portfolio posts :)

    Best regards,
    Yigit

    #813901

    Wow Yigit, that works great!

    Some extra CSS and it looks great too!

    Can you please flag this topic as closed?

    Thanks & best regards,
    Monique

    #813903

    Hi Monique!

    You are welcome! It looks great :)
    Let us know if you have any other questions or issues!

    Cheers!
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show tags in portfolio’ is closed to new replies.