Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI'm new in wordpress. I am using one custom theme and install in wordpress.
I want to change category page title and remove "Category:" prefix from title. How can I manage it from admin ?
I don't know wordpress programming. So, I need to setup using admin panel.
Please guide me. Thanks !!
Page URL : http://localhost/tutorialsite/category/magento/magento-2/
Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 6 years ago.
Improve this questionI'm new in wordpress. I am using one custom theme and install in wordpress.
I want to change category page title and remove "Category:" prefix from title. How can I manage it from admin ?
I don't know wordpress programming. So, I need to setup using admin panel.
Please guide me. Thanks !!
Page URL : http://localhost/tutorialsite/category/magento/magento-2/
In your functions.php
of your theme file add the following code, taken from Remove "Category:", "Tag:", "Author:" from the_archive_title.
add_filter( 'get_the_archive_title', function ($title) {
if ( is_category() ) {
//being a category your new title should go here
$title = single_cat_title( '', false );
} elseif ( is_tag() ) {
$title = single_tag_title( '', false );
} elseif ( is_author() ) {
$title = '<span class="vcard">' . get_the_author() . '</span>' ;
}
return $title;
});
Of course you need to read about how the functions.php
works. https://codex.wordpress/Functions_File_Explained