Home Forums WoodMart support forum shop page title

shop page title

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #590598

    yassmingad111
    Participant

    Hello,
    I’m encountering an issue with changing the title of the Shop page on my site. The Shop page does not appear in the Pages section of the WordPress dashboard, which is preventing me from editing it directly.

    I’ve tried using the following code snippets in the functions.php file to change the Shop page title, but neither of them have worked:/**
    * Filter to Change WooCommerce Page Title.
    */
    add_filter( ‘woocommerce_page_title’, ‘new_woocommerce_page_title’ );

    function new_woocommerce_page_title( $page_title ) {
    if ( $page_title == ‘Shop’ ) {
    return ‘New Shop Title’; // Add your title here.
    }
    }
    Second Code Snippet:add_filter( ‘woocommerce_page_title’, ‘woo_shop_page_title’);
    function woo_shop_page_title( $page_title ) {
    if ( ‘Shop’ == $page_title ) {
    return “Your Replacement Title Here”;
    }
    }

    Attachments:
    You must be logged in to view attached files.
    #590621

    yassmingad111
    Participant

    hello,
    thank you for your help I reached out to WooCommerce support, and they helped resolve the issue with changing the Shop page title. They provided this code, which worked perfectly:
    add_filter( ‘the_title’, ‘custom_shop_page_title’, 10, 2 );
    function custom_shop_page_title( $title, $id ) {
    if ( is_shop() && get_option( ‘woocommerce_shop_page_id’ ) == $id ) {
    return ‘Your New Shop Title’; // Replace with your desired title
    }
    return $title;
    }

    Simply add this code to your theme’s functions.php file. It replaces the Shop page title with your chosen text.

    I hope this helps others!

    #590664

    Sounds Great! that your issue has been solved.

    I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.

    We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.

    Thanks for contacting us.
    Have a great day.

    Topic Closed.
    Best Regards.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘shop page title’ is closed to new replies.