- This topic has 5 replies, 2 voices, and was last updated 7 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.
Home › Forums › Pro Themes › Reef Plus › How to remove 'Category:' in page title banner image
How do I make the ‘Category:’ description right before the name of my category page not show in the actual title like in the screenshot below? Instead of ‘Category: Men’ I want it to say only ‘Men’. Thanks!
And by banner I mean the inner banner
Hello @gentspoppin,
First of all, thank you for using the pro theme.
Now to remove the category: in the header of the header image, you have to activate the child theme.
You can even activate the child theme using the plugin given below:
https://wordpress.org/plugins/wp-child-theme-generator/
After activating the child theme in your child theme functions.php file paste below given code :
function reef_plus_child_custom_cat_title_removal ($title) {
if ( is_category() ) {
$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;
}
add_filter( 'get_the_archive_title', 'reef_plus_child_custom_cat_title_removal');
Hope this helps.
Best Regards!!
Have a great day 🙂 .
Hi !
So I followed the steps.
I installed the child theme generator, and after I edited the child theme functions.php in the wordpress editor and saved the file, the whole website got an ‘HTTP ERROR 500’ and I had to revert to the original Reef plus theme to “unrbreak” the site. Any idead what I did wrong?
Hello @gentspoppin,
Please once check the issue by setting the WP_DEBUG true as it will display PHP errors, notices and warnings.
Also, do not forget to post the warnings and error here for further inspection.
Thank you.
Best Regards!!
Ok, it worked actually. Now it looks exactly as it should, thank you!
And another question, should we do this to the original theme now, or keep using the child instead and keep the original as a back up?
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. |