Remove comma from wordpress categories!!!
-
Hi, I want to remove comma between categories displayed on my home page http://thedripple.com below titles of post!
I’m using the following code to display categories..
<?php $parentscategory =""; foreach((get_the_category(' , ')) as $category) { if ($category->category_parent == 0) { $parentscategory .= ' <a class="cat-post-before" href="' . get_category_link($category->cat_ID) . '" title="' . $category->name . '">' . $category->name . '</a>, '; } } echo substr($parentscategory,0,-2); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Remove comma from wordpress categories!!!’ is closed to new replies.