Archived topic
Hook not working on shop page / on sale page
5 replies · Started by Roberto Enrique on December 8, 2019
I'm trying to target the after_main_content hook for my main shop page to add some content but if I target the page, it doesn't work at all.
The website is this one: http://www.saporidelbelice.com
I'm trying to do this mainly because I need to add SEO content bellow the main shop page
https://www.saporidelbelice.com/acquista-online/
while I also use this plugin: https://wordpress.org/plugins/on-sale-page-for-woocommerce/ to display a custom link on the main menu (the red one as of today) which seems to use the standard shop template with a custom product query.
If I add the content directly on the main shop page, it displays on top of the listing but this happens both in the main shop archive as well on the offer/sale page.
I'm trying to add the content bellow the results targeting the "on-sale" and "main-shop" pages using GP Hooks but they just don't work and Honestly I don't know what else to do.
Thanks in advance and have a good weekend :-)
Hi there,
try the Product Archives location for your Display Rules
It actually did the trick, thanks Dave.
The only problem I have right now is how to target both special offer and product archive.
The page exclussion is not working so the content displays exactly the same in both pages.
Did you resolve it?
I see different content on:
offerte-speciali compared to acquista-online
Yup, now I just used the product shortcode with pagination and ditched the plugin :-)
Thanks
Haha - good call :) Glad you got it resolved.