Support » Plugin: WooCommerce » Remove page title?

Viewing 9 replies - 1 through 9 (of 9 total)
  • This page title isn’t added through an action, so you can’t remove it using the remove_action() function. I think the title you are looking for is located in the archive-product.php template file (although this applies to pretty much all template files) and you can override that template via your theme.

    Please read our documentation on template structure and overriding templates for more information about how to do that.

    I went into archive-product.php, and removed <h1 class="page-title"><?php woocommerce_page_title(); ?></h1>.

    I was hoping I could use the remove_action function, but I guess the title wasn’t exactly designed to be hooked and unhooked.

    Why is it like that, though? There are a lot of functions that use hooks, while some of them need to be removed manually from their respective templates… isn’t that a bit confusing?

    Please note that you should not change files in the WooCommerce plugin itself, but use the template overrides to protect your changes for when you update the plugin. The template overrides you do in your theme are update safe.

    The plugin is a moving process and we’re always open to changes. You are welcome to propose a change via our GitHub repository, if you like. Please do be as detailed as possible about your reasons to do this change, if you do.

    yeah. I put the changes into a template as directed in the docs…

    thanks for your help! its not that often that a developer comes online to help in the support section.

    …and for proposing a change — do I need to provide the code as well? or is it optional?

    You’re welcome, happy to help.

    Well, if you want us to seriously consider it, you’ll have to be very detailed in your description on what and why (especially the ‘why’ part is important) you want changed, providing the code is optional (but allowed :)).

    Can somebody help me in customizing this title based on the category and subcategory that user has selected from the menu?
    For example, user want to see the products with brand name “sony”, where brand is category and sony is sub category, then title should be like “Product look up by Brand: Sony”
    Similarly for prices it should be like “Product Look up by Price: $100-$200”, where price is category and $100-$200 is subcategory.
    I know it will be using “if loop” but I’m kinda new here so don’t know the exact code to customize.

    You can find woocommerce-template.php under wp-content/plugins/woocommerce

    The line of code you’re looking for from this thread (providing you havent altered your woocommerce-template) is line 43

    That’s all

    enjoy Folks



    This will work:

    add_filter( ‘woocommerce_page_title’, ‘woo_shop_page_title’);

    function woo_shop_page_title( $page_title ) {

    if( ‘Shop’ == $page_title) {
    return “My new title”;

    Src: [#13]

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Remove page title?’ is closed to new replies.