How to remove “Category” word from title in twentytwentyone
-
Hello,
I want to remove word “Category: ” from the category title on category pages.I’ve added following function in my functions.php in my child theme but this code doesn’t have any effect. What am I doing wrong or how to fix it with function if possible?
<?php add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles', 11 ); function my_theme_enqueue_styles() { wp_enqueue_style( 'child-style', get_stylesheet_uri() ); } function amelia_remove_category_title( $title ) { if ( is_category() ) { $title = single_cat_title( '', false ); } return $title; } add_filter( 'remove_the_archive_title', 'amelia_remove_category_title' );
- This topic was modified 5 months ago by .
- This topic was modified 5 months ago by . Reason: redundant link removed
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to remove “Category” word from title in twentytwentyone’ is closed to new replies.