-
AuthorPosts
-
October 15, 2018 at 9:37 pm #1021833
Hello!
I found this post that helped me:
https://kriesi.at/support/topic/show-tags-in-portfolio/However, I am not sure how to add a seperator between each tag. Right now, the tags run into each other.
I would like to separate them with a “|” symbol.Any help would be greatly appreciated.
-
This topic was modified 7 years ago by
flordelizamejia.
October 16, 2018 at 6:06 am #1021981Hey flordelizamejia,
Please try this in your child theme functions.php file:
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');Best regards,
RikardOctober 16, 2018 at 4:02 pm #1022240Thank you Rikard!
This solution worked out great.But, when I click on each tag, it brings me to the same page.
How do I have it so that when I click on a tag, it will bring me to a page with similarly tagged items?Any help would be appreciated.
October 17, 2018 at 3:24 pm #1022804Hi flordelizamejia,
I inspected it and noticed that no urls are generated.
Can you give us admin access? so we can check on the backend and try to fix it if Appearance > Editor is available.
Just post the login credentials in private content, so it’s only visible to the moderators.Best regards,
NikkoOctober 17, 2018 at 3:44 pm #1022813Thank you Nikko!
The login credentials are listed in the private content.October 17, 2018 at 5:01 pm #1022894Hi flordelizamejia,
Thanks for giving us admin access.
I have modified this part of the code:$taglink = get_tag_link($tag->tag_id);to:
$taglink = get_tag_link($tag->term_taxonomy_id);Let us know if you need further assistance.
Best regards,
Nikko -
This topic was modified 7 years ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
