Change the last line to this:
$output = strtr( wp_list_categories( 'include=".$cat_ids."&title_li=&style=none&echo=0' ), array( '<br />' => ' // ' ) );
echo preg_replace( '@\s//\s\n$@', '', $output );
Related Posts:
- Can I set a default featured image for a category?
- What’s the URL for a category archive?
- Weird behaviour when adding terms/term_taxonomies programmatically
- how to use a different domain/subdomain for authors/catagories on single site?
- How to list child categories in custom category template?
- Customizing Default Categories Widget
- Divi change project slug based on category
- WordPress MU 2.9.2 to 3.0.5 changes to category.php
- Keep active class in post page
- Are Custom Taxonomy Templates Possible?
- Categories lose hierarchy order once assigned to post
- Remove Categories and Tags from Admin Dashboard
- Custom category link in wp_list_categories()
- Using widget logic I want to show only a widget on the archive page if there are no posts
- Why is this category page limiting the number of posts?
- What’s the difference between “parent” and “category_parent” in a WP_Term object?
- Show all posts of sub category in a page like: foo.com/category/subcategory/ using UNCODE Theme
- Replace category titles
- Hide tag and category boxes from the post editor
- 403 forbidden on one page only
- how to remove category from database
- Add multiple=”multiple” attribute to categories dropdown
- Allow dot in wordpress permalinks (only for categories)
- How to know if it’s a child taxonomy?
- Exclude category from Tag Template
- How to provide value for ‘selected’ on wp_dropdown_categories() for ‘multiple’ options
- How to display post images in category view?
- Exclude Posts From Specific Category from Next and Previous post links
- How would I go about adding custom header images per category?
- how to query posts and auto assign category if post title has keyword
- How to Add Default Content for all Category Pages Before and After Content?
- Show popular post by category code
- Sub Categories Keep Redirecting to Pages With Same Slugs
- Categories in admin interface: can they be collapsible?
- How to append category name to category ID in a form field
- Category template to show different categories based on parent
- Customize category page for different custom taxonomies
- Conditional IF current cat is the smallest/last/end child cat THEN
- Equivalent to in_category() for subcategories
- query_post order desc
- Limit number of posts on a custom category template – breaking pagination
- How to create a custom meta box field in category? [duplicate]
- list categories based on updated posts [closed]
- How to create a subcategory to a PAGE on WP?
- How to show 1-5 of X Total Results
- Hierarchical permalink structure for posts showing categories and sub-categories
- how i can hide some category from author admin panel?
- Display posts from a category
- Finding the category id’s on category intersection pages
- SQL query to return categories and category parents
- How to Remove a Title from All Category and Tags Page?
- Display sibling categories on category page
- Getting the category title / description returns first matching post?
- I want to know how to output child categories related to parent categories
- why get_the_post_thumbnail( the_ID()) echos extra post id
- Allow user to select categories that will display in post loop
- Echo show_count of categories separately without using wp_list_categories
- Two Sections on Woocommerce Catergory Page [closed]
- How to fetch the highest category in the hierachry for a specific post?
- Woocommerce search form with category select
- How to not display subcategories in Recent Posts widget area?
- Getting the Most Recent Posts from Multiple Categories
- Display category title and three latest post inside the category
- Let user select their own category
- How to store category and tags separatly on wordpress?
- Pagination breaks on child-categories, works fine on parent-category
- Is the part “category” fixed to an URL to an archive or post?
- How can I use AJAX with check-box categories?
- wp_delete_term or wp_delete_category?
- Get post content intro text on category.php?
- List Categories By Specified First Character
- the category city made as a subdomain
- Unable to browser posts in categories
- Category name for all posts getting assigned to a single random post
- Displaying Single Product Page Parent and Child Category
- wp_get_post_categories not work currently on loop.php
- How to add the .html extension to the category?
- How to create category filter on a blog like on the site below?
- Inline If statement to echo CSS [closed]
- Get category base permalink
- Wrong category in URLs accepted like the correct one
- WooCommerce showing active product categories on single product page
- how to exclude specific category types (uncategorized) from blog page?
- Confused about category.php template – not working
- Style a category page the same way as the homepage?
- Store All Post Categories In Array
- How to add an “All” category to the tag cloud?
- Display Taxonomies in loop with template args
- How to assign image on specified category and not show the image on other categories
- How can I add a Categories page link to a menu? [closed]
- Display only the latest post
- Change next_post and previous_link to navigate throught parent categories only
- Way to show content of a post, but if exceeds character limit revert to excerpt?
- Multiple Parent Category URLs
- get posts from 2 categories. (2 posts)
- What defines a post as portfolio page content?
- How to add location as category?
- Converting Categories (with ACF fields) to custom taxonomies
- Taxonomy term RestApi data 10 rows limitions
- Restricted category in Woocommerce [closed]