Does anyone know how to display the parent category and then sub-category with a separator in between, but not at the end of the line?
I’m using this:
<?php echo get_category_parents($cat, TRUE, ' / '); ?>
Which displays: Parent Category / Sub-Category /
But I want it to display Parent Category / Sub-Category
I’ve looked all over and can’t find any other code that works.
- The topic ‘get_category_parents with no end separator’ is closed to new replies.