Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #840434

    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

    #841890

    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

    #843174

    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

    #843466

    Hi,

    Please post the login details in the private field. We would like to check it.

    Best regards,
    Ismael

    #843960

    Hi Ismael,

    Please find below.

    Regards,
    Monique

    #844299

    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

    #844739

    Hi Ismael,

    Wow great! Thanks a lot!

    Can you flag this topic as closed please?

    Regards,
    Monique

    #845208

    Hi,

    Sure. Glad it is working.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Tags in portfolio don't link to corresponding tag archive’ is closed to new replies.