Home Forums Pro Themes Reef Plus How to remove 'Category:' in page title banner image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #59901
    Gents Poppin
    Participant

    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!

    https://puu.sh/yBff3/978a9c67a3.png

    #59905
    Gents Poppin
    Participant

    And by banner I mean the inner banner

    #59969
    wensolutions
    Keymaster

    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 🙂 .

    #60050
    Gents Poppin
    Participant

    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?

    https://puu.sh/yBUV7/37a260a2df.png

    #60059
    wensolutions
    Keymaster

    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!!

    #60080
    Gents Poppin
    Participant

    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?

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