WordPress.org

Forums

WooCommerce - excelling eCommerce
[resolved] Remove Base Page Title (19 posts)

  1. baberim
    Member
    Posted 2 years ago #

    Hi there,

    As you can see here: http://www.baberick.com/shop The base page title is a little huge and pretty redundant, but I can't figure out how to remove it all together.

    Can someone help me out with this?

    Thank you.

    http://wordpress.org/extend/plugins/woocommerce/

  2. baberim
    Member
    Posted 2 years ago #

    I think I have fixed this.

    For anyone who needs this in the future. It is in the woocommerce-template.php

    look for <h1 class="page-title">

    and

    echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title );

    Remove both of these

  3. glamj
    Member
    Posted 2 years ago #

    thank you! im looking for this too !!!
    and... if i want to fix diff. word how can i change ?

  4. baberim
    Member
    Posted 2 years ago #

    You change the wording by going into your woocommerce settings under "pages"

  5. glamj
    Member
    Posted 2 years ago #

    thank you!
    by any chance do you know how to remove picture outline..?

  6. baberim
    Member
    Posted 2 years ago #

    I'd imagine that has more to do with your theme. Sorry.

  7. keysuuh
    Member
    Posted 2 years ago #

    Where exactly is this code located?
    echo apply_filters( 'the_title', ( $shop_page_title = get_option( 'woocommerce_shop_page_title' ) ) ? $shop_page_title : $shop_page->post_title );

    I've been trying SO hard to remove the base title >.<
    I had named one of my h1 tags page-title as well but when I removed it nothing happened. I tried looking into the archive-product.php file , still nothing worked!
    I hope this works! I just need to locate that code!
    aaaahhhhhh ! lol

    Please help.

  8. Uh Oh Spaghetti Os
    Member
    Posted 2 years ago #

    Hi there,

    Might be a little too late, but for anyone wondering:

    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

  9. mojodesign
    Member
    Posted 1 year ago #

    I removed the two lines as you said, but nothing happened...
    It still shows the page-title...

  10. oblivius
    Member
    Posted 1 year ago #

    the file is in /plugins/woocommerce/archive-product.php

  11. RealGLINTON
    Member
    Posted 1 year ago #

    Hey everyone!!

    How can I change the name of the product Page Title that appears in the browser tab.

    Mine currently reads (Product). I want to change this title.

    Any help would be greatly appreciated.

  12. FriskOKitty
    Member
    Posted 1 year ago #

    I have the same issue as RealGlinton.

    How can I change the name of the product Page Title that appears in the browser tab.

    Mine currently reads (Product). I want to change this title.

    Any help would be greatly appreciated.

    Any ideas?

  13. jnz31
    Member
    Posted 1 year ago #

    here is a solution for the page title

    in the header.php file of your active theme, look for the <title> element and replace it with the following code.

    <title><?php if ( is_shop() ){ bloginfo("name"); } else { wp_title( '|', true, 'right' ); } ?></title>

    if shop catalog page: show blog name (set it up under settings > general).
    else show normal wp_title.

    you also could
    echo "Some fancy String";

    but the above solution is more dynamic and controllable via backend.

  14. josaphi
    Member
    Posted 1 year ago #

    Pretty old forum but I had the same issue as @RealGLINTON and @FriskOKitty. I found that troublesome "Products" title in the woocommerce.php file on line 22: `* Post Types
    **/
    do_action( 'woocommerce_register_post_type' );

    register_post_type( "product",
    array(
    'labels' => array(
    'name' => __( 'YOURSTORENAMEHERE', 'woocommerce' ),`

    Hope this helps.

  15. RealGLINTON
    Member
    Posted 1 year ago #

    Thank you Josaphi!!!

  16. DeeperLook
    Member
    Posted 1 year ago #

    Josaphi, you're a legend!

  17. digicution
    Member
    Posted 1 year ago #

    Hey guys,

    Had a similar encounter and needed to remove the Page Title displayed by WooCommerce on a main template I was editing.

    Rather than removing the lines from the original woocommerce-template.php file (as these changes would be overwritten if upgraded), you can simply add a filter to your theme's functions.php file as follows:

    //If You Want Page Title Displayed
    add_filter('woocommerce_show_page_title',true);

    //If You Want Page Title Hidden
    add_filter('woocommerce_show_page_title',false);

    Hope this helps someone :)

  18. crownprinceofdisco
    Member
    Posted 1 year ago #

    @ digicution

    This worked perfectly, thank you!

  19. digicution
    Member
    Posted 1 year ago #

    @ crownprinceofdisco

    No worries, glad it helped you out. Following on from this:

    The filter didn't work on the WooCommerce Cart & Checkout pages. These use the standard page template within your theme so in order to remove the title from these, you can use the is_cart() & is_checkout() functions to detect if we're on those pages.

    In my theme, I wanted to remove the title from the cart & checkout pages so in my page.php file, I replaced <?php the_title(): ?> with :

    <?php
    //If This Is Not WooCommerce Cart or Checkout
    if(!is_cart() && !is_checkout()) {

    //Write Out The Title
    the_title();

    //End If This Is Not WooCommerce Cart or Checkout
    }
    ?>

    Hope this helps :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic