- This topic has 1 reply, 2 voices, and was last updated 2 years, 11 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.


Home › Forums › Free Themes › News Vibe › Replace category list from “,” to ” “
Tagged: add_filter, custom category list, custom function
I want to change my category list in my list of post, and single post from “,” to ” “. I have already implement this code in functions.php
function custom_category_list_separator($list) { $new_separator = ‘|’; // Replace ‘|’ with your desired separator $list = str_replace(‘,’, $new_separator, $list); return $list; } add_filter(‘the_category’, ‘custom_category_list_separator’);
But it still didn’t work. I think it maybe different filter that this theme call for category instead of “the_category”. I have already read the docs, and still couldn’t find any info. Please help.
You can add this CSS in the Additional CSS
.post-categories :not(:last-child):after {
content: ” “;
margin-right: 5px;
}
| Cookie | Duration | Description |
|---|---|---|
| cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
| cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
| cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
| cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
| cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
| viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |



