- This topic has 9 replies, 3 voices, and was last updated 2 years, 11 months ago by
David.
-
AuthorPosts
-
March 27, 2023 at 12:48 pm #2584698
mkjj
I would like to add content on the main Woocommerce shop page. I tried a hook element with the display rule “woocommerce_after_shop_loop”. Unfortunately, it doesn’t change anything. For test purposes I used simple plain text. We configured a page as the main shop page in the Woocommerce settings and would prefer this over a static page (using a Woocommerce shortcode). The reason is that another plugin depends on a default shop page.
Thank you!
March 27, 2023 at 2:03 pm #2584771Ying
StaffCustomer SupportHi there,
We configured a page as the main shop page in the Woocommerce settings and would prefer this over a static page (using a Woocommerce shortcode)
Not sure I understand how it is configured exactly.
If the page is not using Woo template, then the hook does NOT exist.March 27, 2023 at 10:43 pm #2585003mkjj
Hi Ying,
we use the standard Woocommerce template and set the main shop page in Woocommerce > settings > products. I refered to this post where David recommended using a static page instead of a dedicated Woocommerce page.March 28, 2023 at 4:38 am #2585388David
StaffCustomer SupportHi there,
if you’re using the static page then that hook does not exist there.
Why not add the content to the static page ?March 28, 2023 at 5:01 am #2585412mkjj
Hi David,
If you’re using the static page then that hook does not exist there.
Do you mean the page that is configured in Woocommerce > settings > products?
Why not add the content to the static page ?
I’m a little bit confused as to what you mean by “static page”. We have two main options for showing the main Woocommerce archive. We can either use a standard page and get the content using a Woocommerce shortcode. Or we can assign a page as the Woocommerce shop page. By default, it is possible to add content BEFORE the Woocommerce loop, but not after it.
In our case we need a page assigned as the Woocommerce shop page for a plugin to work. This is why I tried to use a hook element for it. Am I missing anything here? I read the documentation but couldn’t find the answer I was looking for.
I probably misunderstand what is meant by “woocommerce_after_shop_loop”. 🙂
March 28, 2023 at 6:04 am #2585507David
StaffCustomer SupportIf you’re using the Woo page that you select in
Woocommerce > settings > productsthen that hook should exist.
Can i see the shop page ?March 28, 2023 at 6:13 am #2585517mkjj
Sure: Here it is. It’s german, but this shouldn’t bother you. 🙂
As display rule I chose page > the assigned shop page. Is this correct? The hook is “woocommerce_after_shop_loop”.
March 28, 2023 at 7:52 am #2585653David
StaffCustomer SupportAh …. the Display Rule needs to be the
Product ArchiveApril 1, 2023 at 12:55 am #2591641mkjj
Sorry, I missed the notification for your last reply. Awesome, this works perfectly fine. It’s a little counter-intuitive. I would have thought that “Product Archive” would include the Woocommerce category pages. This is why I didn’t even try this setting. Anyway, thank you very much for the great support.
April 1, 2023 at 6:31 am #2591939David
StaffCustomer SupportWe should probably add a sub label to that to make it clearer. Ill make a note.
Glad to be of help
-
AuthorPosts
- You must be logged in to reply to this topic.