Hey all,
I am stuck at a problem I’m not able to solve.
First of all, I have enabled the categories & tags to be shown below
the post / page title. This works fine!
The only issue is: I want to add a separator between the individual categories/tags.
Like this:
category1,category2 tag1,tag2
Below is the code I use in GP Hooks. I can’t see any error, but still no comma separator is shown in the output.
Does anybody have an idea what might be wrong?
Thanks guys!!
Adrian
/*------- Show categories & tags below post/page title ------ */
$postid = get_the_ID();
$categories = get_the_category($postid);
if ( ! empty($categories) && is_page( $postid ) ) :
$categories_list = get_the_category_list( _x(', ', $postid ) );
$tag_list = get_the_tag_list( _x( '', ', ', '', $postid ) );
?>
<div class="entry-meta">
<span class="categories_links"> <? echo $categories_list; ?></span>
<span class="tag_links"> <? echo $tag_list; ?></span>
</div>
<?php endif; ?>