Skip to content

Instantly share code, notes, and snippets.

@corsonr
Last active December 23, 2020 08:16
Show Gist options
  • Select an option

  • Save corsonr/8703820 to your computer and use it in GitHub Desktop.

Select an option

Save corsonr/8703820 to your computer and use it in GitHub Desktop.
WooCommerce : Remove the "shop" title on the main shop page
<?php
/**
* Removes the "shop" title on the main shop page
*/
add_filter( 'woocommerce_show_page_title', '__return_false' );
@manidip

manidip commented Jul 17, 2015

Copy link
Copy Markdown

Awsome....It Worked...

@thehayk

thehayk commented Aug 22, 2015

Copy link
Copy Markdown

Can you please help me figure out where I need to make these edits? Thanks!!

@Misplon

Misplon commented Sep 8, 2015

Copy link
Copy Markdown

Added to the functions.php file in your child them @thehayk.

@oscarsernabarranquilla

Copy link
Copy Markdown

I added but doesnยดt wok.
Do I mus to do any else change?

@snknewbie

Copy link
Copy Markdown

@oscarsernabarranquilla,

try paste the code without <?php at the beginning..Ex:

add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' );
/**

  • woo_hide_page_title
    *

  • Removes the "shop" title on the main shop page
    *

  • @access public

  • @SInCE 1.0

  • @return void
    */
    function woo_hide_page_title() {

    return false;

}

@sourcebreak

Copy link
Copy Markdown

wp-content/plugins/woocommerce/templates/archive-product.php

Edit this file archive-product.php and remove the below 3 lines.

                    <h1 class="page-title"><?php woocommerce_page_title(); ?></h1>
            <?php endif; ?>

This will remove page title on shop page and all other pages.

ghost commented May 19, 2016

Copy link
Copy Markdown

You can shorten the code snippet by using the built in WordPress function __return_false, like this:

add_filter( 'woocommerce_show_page_title', '__return_false' );

@mlgiarra

Copy link
Copy Markdown

Doesn't work in mobile view. How to remove it in mobile view?

@yashashvi0007

Copy link
Copy Markdown

not working, please help

@linhc1997

Copy link
Copy Markdown

if(apply_filters('woocommerce_show_page_title' , true)){

add_filter( 'woocommerce_show_page_title' , 'woo_hide_page_title' );
function woo_hide_page_title() {
	return false;
}

}

I did it !

@hectorsevillasandoval

Copy link
Copy Markdown

add_filter('woocommerce_show_page_title', '__return_false');

@Monyane

Monyane commented Nov 30, 2017

Copy link
Copy Markdown

Add this to your css
.woocommerce #Subheader {
padding: 110px 0 100px !important;
}
.woocommerce #Subheader .title {
display: none !important;
}

@Ruudiz

Ruudiz commented Jan 18, 2018

Copy link
Copy Markdown

I added a ccs code:
.page-title-shop h1 { display: none }

@bublick

bublick commented Jul 17, 2018

Copy link
Copy Markdown

I like this one:

add_filter('woocommerce_show_page_title', function(){ return false; } );

PHP >5.3

@ryscript

ryscript commented Feb 7, 2020

Copy link
Copy Markdown

For 2020 who got here, you may use add_filter( 'woocommerce_show_page_title', '__return_false' );

@corsonr

corsonr commented Feb 10, 2020

Copy link
Copy Markdown
Author

Updated... 6 years later ๐Ÿ˜‰

@priyavasant028

Copy link
Copy Markdown

hi.. I am using below code to hide page title but it is not working.

function hide_woocommerce_page_title( $visibility ) {
// Default $visibility value is true
return false;
}
add_filter( 'woocommerce_show_page_title', 'hide_woocommerce_page_title' );

@Freekers

Freekers commented Jun 9, 2020

Copy link
Copy Markdown

Thanks!

@hi2rashid

hi2rashid commented Jun 21, 2020

Copy link
Copy Markdown

For me this worked h1.page-title { display: none }

In Custom CSS editor page https://mysite.com/wp-admin/customize.php?autofocus%5Bsection%5D=custom_css

@ibobbymac

Copy link
Copy Markdown

added css to customization (least work & won't get overwritten by future updates or flagged by wordfence)

.woocommerce .page-title, .woocommerce-page .page-title{
display: none !important;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment