• Skip to main content
  • Skip to primary sidebar

Technical Notes Of
Ehi Kioya

Technical Notes Of Ehi Kioya

  • Forums
  • About
  • Contact
MENUMENU
  • Blog Home
  • AWS, Azure, Cloud
  • Backend (Server-Side)
  • Frontend (Client-Side)
  • SharePoint
  • Tools & Resources
    • CM/IN Ruler
    • URL Decoder
    • Text Hasher
    • Word Count
    • IP Lookup
  • Linux & Servers
  • Zero Code Tech
  • WordPress
  • Musings
  • More
    Categories
    • Cloud
    • Server-Side
    • Front-End
    • SharePoint
    • Tools
    • Linux
    • Zero Code
    • WordPress
    • Musings
Home » Backend (Server-Side) » Remove WooCommerce Page Title From Shop Page (But Leave On Archive Pages)

Remove WooCommerce Page Title From Shop Page (But Leave On Archive Pages)

December 28, 2019 by Ehi Kioya Leave a Comment

The page title “Shop” shown on the WooCommerce shop page by default is just plain ugly in my opinion. Especially if you use the WooCommerce shop page as your website’s homepage.

Remove WooCommerce Page Title From Shop Page (But Leave On Archive Pages)

Most of the PHP code pieces (or CSS snippets) floating around for removing this “Shop” page title will also remove proper/descriptive page titles from archive pages (like category and tag pages).

If you only want to remove the page title from the shop homepage and leave all WooCommerce archive pages as is, use this piece of PHP code:

add_filter( 'woocommerce_page_title', 'ehi_woocommerce_page_title' );
function ehi_woocommerce_page_title( $page_title ) {
	if(is_shop() && $page_title == 'Shop') {
		return ""; // Or enter the text you want to show instead of "Shop"
	}
	else
	{
		return $page_title;
	}
}

The conditional statement above is…
if(is_shop() && $page_title == ‘Shop’)
…in case the ampersands get mangled by CMS formatting.

That code goes inside your themes functions.php file.

Found this article valuable? Want to show your appreciation? Here are some options:

  1. Spread the word! Use these buttons to share this link on your favorite social media sites.
  2. Help me share this on . . .

    • Facebook
    • Twitter
    • LinkedIn
    • Reddit
    • Tumblr
    • Pinterest
    • Pocket
    • Telegram
    • WhatsApp
    • Skype
  3. Sign up to join my audience and receive email notifications when I publish new content.
  4. Contribute by adding a comment using the comments section below.
  5. Follow me on Twitter, LinkedIn, and Facebook.

Related

Filed Under: Backend (Server-Side), PHP, Programming, Snippets, WordPress Tagged With: PHP, WooCommerce, WordPress

About Ehi Kioya

I am a Toronto-based Software Engineer. I run this website as part hobby and part business.

To share your thoughts or get help with any of my posts, please drop a comment at the appropriate link.

You can contact me using the form on this page. I'm also on Twitter, LinkedIn, and Facebook.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

25,642
Followers
Follow
30,000
Connections
Connect
14,582
Page Fans
Like
  • Recently   Popular   Posts   &   Pages
  • Actual Size Online Ruler Actual Size Online Ruler
    I created this page to measure your screen resolution and produce an online ruler of actual size. It's powered with JavaScript and HTML5.
  • Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library Allowing Multiple RDP Sessions In Windows 10 Using The RDP Wrapper Library
    This article explains how to bypass the single user remote desktop connection restriction on Windows 10 by using the RDP wrapper library.
  • WordPress Password Hash Generator WordPress Password Hash Generator
    With this WordPress Password Hash Generator, you can convert a password to its hash, and then set a new password directly in the database.
  • Forums
  • About
  • Contact

© 2021   ·   Ehi Kioya   ·   All Rights Reserved
Privacy Policy