Can someone please help me with deleting the word category from menu
Need help with one of our themes? Ask here.

busyfitwoman

New Member Rank
Posts: 1
Joined: Wed Apr 12, 2017 1:57 pm
Display Name: busyfitwoman

Can someone please help me with deleting the word category from menu

linkPost by busyfitwoman » Wed Apr 12, 2017 2:03 pm

I am turning my categories into menus, but if you click on any of the menu items besides home each one of them has category: with the title of the page, is there any way I can have this not show up. I have tried the css code .page-title {display: none;} with .entry-title and without, but it has not worked.

This is my favorite theme and I hope to be able to work my personal bugs out before purchasing it.
User avatar
Asmi Khalil

Site Admin Rank
Posts: 781
Joined: Fri Jun 26, 2015 7:13 am
Display Name: Asmi Khalil
Location: Tunisia

Re: Can someone please help me with deleting the word category from menu

linkPost by admin » Thu Apr 13, 2017 12:23 am

Hi busyfitwoman,
Thanks for joining our forum :D
Please tell me which theme are you using? Is it RedWaves lite?

If you want to remove the whole title, this CSS code will work ( go to Appearance => Customize => Custom CSS and add the below code to Custom CSS textarea ):
.category .page-header {
	display: none;
}
If you want to delete just the word category and keep the category title; ie: you have a category named "Best Offers". By visiting category archive page, you will see "Category: Best Offers" as page title. If you want to delete "Category:" and keep "Best Offers", CSS won't be able to do the trick. We need to use PHP. The below code will achieve this but you need to add it to your theme functions.php file. WordPress has a built in code editor which you can use to add this code. Go to Appearance => Editor, click "Theme Functions (functions.php)" and add the below code at the end then save:
function redwaves_lite_remove_prefix_from_archive_title( $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', 'redwaves_lite_remove_prefix_from_archive_title' );
Not just "Category:" will be stripped from the archive title, but also "Author:" and "Tag:".
I think there is a world market for maybe five computers. - IBM chairman Thomas Watson, 1943
brianmagento

New Member Rank
Posts: 1
Joined: Mon Apr 17, 2017 8:11 pm
Display Name: brianmagento

Re: Can someone please help me with deleting the word category from menu

linkPost by brianmagento » Mon Apr 17, 2017 8:15 pm

You can use SEO plugin for wordpress like Yoast to delete the word category from menu. I;m using that plugin on my wordpress blog: magentoexplorer. com , take a look

Who is online

Users browsing this forum: No registered users and 1 guest

It is currently Tue Apr 23, 2019 10:13 am