Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please provide a link to a page on your site where we can see this. Thanks.

    You could assign a different category to that post or rename the “uncategorized” category, too.

    Thread Starter trilback

    (@trilback)

    DJ-geek.com

    Hello,

    There are more ways you can achieve this:

    1. You can add custom CSS to Go to Appearance → Customize – Custom/Additional CSS section, this code -> div.taxonomy-category.wp-block-post-terms {display: none;}
    2. Use a function to hide uncategorized category, by adding it to your theme’s functions.php file ->
    function remove_uncategorized_category() {
    $categories = get_categories( array( 'exclude' => array( 1 ) ) ); // Replace 1 with the ID of your uncategorized category
    wp_set_object_terms( get_option( 'page_on_front' ), array_values( wp_list_pluck( $categories, 'term_id' ) ), 'category' );
    }
    add_action( 'init', 'remove_uncategorized_category' );

    3. Or just add a new category name and assign it to your post, then the post will show some other name instead of uncategorized.

    I hope you find this helpful, kind regards.

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