Site logo

[Resolved] Woocommerce shop page set to the homepage on a subdomain

Home Forums Support [Resolved] Woocommerce shop page set to the homepage on a subdomain

Home Forums Support Woocommerce shop page set to the homepage on a subdomain

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #2480872
    Scott

    I’ve moved my WooCommerce store to a subdomain. Since it doesn’t require a “homepage” itself I set the “homepage” setting in the customizer to be the shop page.

    I’ve got the basic structure set but one thing I can’t figure out is why the Title of the shop page doesn’t show?

    If I change the homepage to any other page the title of the page shows.

    Thoughts on how to get the Title to show?

    #2481076
    Ying
    Staff
    Customer Support

    Hi Scott,

    1. To show to page title of shop, go to customizer > layout > WooCommerce, check the Display page title box.

    2. GP has no control over the breadcrumbs, it’s added by Woocommerce, so I guess Woocommerce doesn’t add breadcrumbs to the homepage.

    #2481422
    Scott

    Hello,

    The display page title box is checked and still no title on the shop page when it’s set as the homepage. The breadcrumb issue isn’t an issue much since breadcrumbs don’t usually appear on the homepage of any site. I mentioned that part in passing.

    Issue with the title though is still ongoing.

    #2481423
    Fernando
    Customer Support

    Hi Scott,

    What Dynamic settings do you have for the Headline Block you’re using for your Shop page’s Page Hero?

    Can you take a screenshot or provide admin login credentials so we can take a closer look?

    Please use the Private Information field for this: https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information

    #2481449
    Scott

    Sure. Info in private field.

    #2481460
    Fernando
    Customer Support

    May we know the login link as well?

    #2481468
    Scott

    Sorry! In the private area

    #2481487
    Fernando
    Customer Support

    I see.

    You need to add page-hero-title to the class list of your Block Element – Page Hero’s Headline Block for the title.

    Adding Custom Classes: https://wordpress.com/support/wordpress-editor/adding-additional-css-classes-to-blocks/

    Then, add this snippet:

    add_filter( 'generate_dynamic_element_text', function( $text, $block ) {
        if ( !is_admin() && is_shop() && ! empty( $block['attrs']['className'] ) && 'page-hero-title' === $block['attrs']['className'] ) {
            $text = 'Shop';
        }
    
        return $text;
    }, 10, 2 );

    Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets

    This adds the Shop Title to your Headline Block if the page is the Shop Page.

    #2481494
    Scott

    Sweet! I’ll work on that now. I’ve never done that before so this should be a good learning experience.

    #2481497
    Fernando
    Customer Support

    Yes, Hooks are indeed great to learn for WordPress development. Let us know how it goes! 🙂

    #2481498
    Scott

    Jeez that was easy!

    This is 100% why I’ve migrated all the sites I manage to GP. Simply outstanding support!

    Thank you so much.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.