- This topic has 10 replies, 3 voices, and was last updated 3 years, 3 months ago by
Scott.
-
AuthorPosts
-
January 2, 2023 at 8:20 am #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?
January 2, 2023 at 11:37 am #2481076Ying
StaffCustomer SupportHi Scott,
1. To show to page title of shop, go to customizer > layout > WooCommerce, check the
Display page titlebox.2. GP has no control over the breadcrumbs, it’s added by Woocommerce, so I guess Woocommerce doesn’t add breadcrumbs to the homepage.
January 2, 2023 at 8:47 pm #2481422Scott
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.
January 2, 2023 at 8:57 pm #2481423Fernando 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
January 2, 2023 at 10:00 pm #2481449Scott
Sure. Info in private field.
January 2, 2023 at 10:31 pm #2481460Fernando Customer Support
May we know the login link as well?
January 2, 2023 at 10:52 pm #2481468Scott
Sorry! In the private area
January 2, 2023 at 11:23 pm #2481487Fernando Customer Support
I see.
You need to add
page-hero-titleto 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.
January 2, 2023 at 11:45 pm #2481494Scott
Sweet! I’ll work on that now. I’ve never done that before so this should be a good learning experience.
January 2, 2023 at 11:54 pm #2481497Fernando Customer Support
Yes, Hooks are indeed great to learn for WordPress development. Let us know how it goes! 🙂
January 2, 2023 at 11:57 pm #2481498Scott
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.
-
AuthorPosts
- You must be logged in to reply to this topic.