Home Forums Free Themes News Vibe Replace category list from “,” to ” “

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #190722
    hijrahassalam
    Participant

    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.

    #190733
    Psink
    Keymaster

    You can add this CSS in the Additional CSS

    .post-categories :not(:last-child):after {
    content: ” “;
    margin-right: 5px;
    }

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.