- This topic has 20 replies, 4 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
June 26, 2022 at 12:54 pm #2265125
GeneratePressUser
Hello, So we made our some theme templates with Elementor but this had 1 big disadvantage we lost the control on implementing hooks within that Elementor area, only we were able to implement hooks above and below the elementor area, so important places like after product title, after add to cart button on single page etc were not possible to be accessed via hook coz elementor was having control of that.
So, after thinking on it we disabled the elementor template on our single product pages, so we would like to get a bit help on styling it like our elementor page, we did almost all other things just a little is left which we believe your team can help.
More info in the private box, Thanks!
June 26, 2022 at 1:24 pm #2265137GeneratePressUser
Adding up to my previous response, pls check private box
June 26, 2022 at 2:17 pm #2265160GeneratePressUser
It seems the CLS score and all is affected a lot after enabling.
Score on using just elementor: https://prnt.sc/L5bsI0zNeoWu
Score after using generatepress + generatepress hooks with elementor shortcodes: https://prnt.sc/MQQFkgr-A2b-
Any idea on how can that be solved or will that always be an issue if we are using it like that?
June 26, 2022 at 10:14 pm #2265341Fernando Customer Support
Hello there,
Starting with the styling, here’s some CSS code you may try adding in Appearance > Customize > Additional CSS:
.single-product .woocommerce-product-gallery__image.flex-active-slide { border: 5px solid #4f4f4f; } .single-product .woocommerce-product-gallery .flex-viewport { height: fit-content !important; } .single-product ol.flex-control-nav.flex-control-thumbs > li >img { border: 5px solid #4f4f4f; } .single-product .summary.entry-summary.single-product .summary.entry-summary h1.product_title.entry-title { margin-bottom: 20px; } .single-product .summary.entry-summary p.price { text-align: center; } table.variations .value { border-radius: 5px; }For the sale label, may you provide a link to a single product which is on sale?
Moreover, with regards to the CLS, part of the issue seems to stem from the Header, and how it’s loaded: [removed as requested by customer]
As shown, it’s loaded late, and it’s pushing down the elements. Are you using a caching/optimization plugin? Can you try adding a Header through a Block Element to see the difference?
Side note, WooCommerce has these hooks available for the single product page: https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/
Hope to hear from you soon.
June 27, 2022 at 10:11 am #2266116GeneratePressUser
Hey Fernando,
I have put that product on sale so you can see it.
Regarding CLS, I am using caching plugin but how can elementor page show things properly without CLS while when elementor shortcode is being used with generatepress hooks that has CLS issue?
June 27, 2022 at 6:02 pm #2266372Fernando Customer Support
For the CSS code with regards to the sale notice, here’s something you may try:
.single-product span.onsale { position:absolute; top: 0; left:0; border-radius: 10px; padding: 15px 20px 15px 20px; margin: -10px 0px 0px -5px; }With regards to the CLS, it’s odd. The Shipping information also shows up opened when the page is loaded, when hooked. Are you using different elements for this? The Elementor page seems to use something called Toggle and the other page is using an Accordion. If they are different, can you try using a toggle block as well to see the difference?
Can you also try temporarily disabling caching/optimization plugins like Jetpack?
Kindly let us know how it goes.
June 28, 2022 at 10:06 am #2267197GeneratePressUser
Hey Fernando,
Actually accordion of elementor shows by default open when page loads so instead of using a script to close it, we have now replaced it with toggle totally which is by default closed.
Regarding Jetpack do you think it does caching or optimisation? coz I don’t feel like it does that, can you once check it now, if you can find anything.
June 28, 2022 at 5:15 pm #2267454Fernando Customer Support
I see.
It’s not apparent why the header is loading the way it is right now when hooked.
We’ve had customers before have similar issues, and the cause was an optimization/caching plugin.
You could try temporarily disabling it, and the test in https://pagespeed.web.dev/ if the CLS goes away.
If not, kindly let us know.
June 30, 2022 at 10:13 am #2269516GeneratePressUser
Hey Fernando,
I have disabled the caching plugin and still it seems to be showing CLS.
June 30, 2022 at 10:44 am #2269549Ying
StaffCustomer SupportThe hook you are using in GP to enter the shortcode is
generate_after_header?If that’s the case, this section has been added to a different location in terms of HTML structure.
It’s within the content area on the elementor page, but before the content area on the GP page, the structure difference seems the cause of CLS.
Try using
generate_inside_containerhook.June 30, 2022 at 10:48 am #2269552GeneratePressUser
Hey Ying,
That does not put it at a proper place, pls see the link in the private box
July 2, 2022 at 3:42 pm #2271427GeneratePressUser
Hey Ying,
Did you manage to check it?
July 3, 2022 at 4:17 am #2271664David
StaffCustomer SupportHi there,
that hook, won’t be full width.
You would need to use the originalafter_headerhook and then figure out why the CSS is loading late to fix the CLS issue.Or alternatively create the hero using a GP Block Element
July 3, 2022 at 12:54 pm #2272100GeneratePressUser
Hey David,
Ok after_header puts it in proper position, but still the CLS is showing bad, like the score is going bad, do you have any idea why CSS is loading late? Is this a common problem with using Elementor shortcodes? I remember you telling me that using things like this won’t have any difference as such noticeable,
July 4, 2022 at 3:32 am #2272493David
StaffCustomer SupportIt looks like you’re loading Elementor stylesheets in the Foot of your site.
Which means they will get applied after the site is loaded, which cause CLS.You should check with Elementor support as to why that happens.
-
AuthorPosts
- You must be logged in to reply to this topic.