- This topic has 9 replies, 2 voices, and was last updated 3 years, 3 months ago by
Ying.
-
AuthorPosts
-
January 13, 2023 at 9:13 am #2494479
Kaspars
Hi,
I’m trying to show a custom element that would be triggered on a listing category page (Using a Directorist plugin), but it doesn’t show up on the front end even though it can be found as an option when I set up a hook in the elements.
I tested the same hook on other pages, and it worked, so it has to be specific to the plugin setup.
Any help would be much appreciated as I tested multiple setups to make it work, but I have had no luck so far.
Thank you in advance.
January 13, 2023 at 12:04 pm #2494639Ying
StaffCustomer SupportHi there,
Can you link me to this element? What hook are you using? What is the location you’ve set?
Let me know!
January 13, 2023 at 12:40 pm #2494657Kaspars
Hi Ying,
Thanks for the quick reply.
I’m testing the element hook on Discoverais.com.
I’m using a block – hook, and you can see the location there as well:

I’m trying to show it for this category:
January 13, 2023 at 12:55 pm #2494678Ying
StaffCustomer SupportBased on your location setting, it does work:
https://your-domain.com/tools/asdfg/The page you linked previously: https://your-domain.com/single-category/cat1/ is a static page, if you want to target this page, the location would be
pages > cat1January 13, 2023 at 1:15 pm #2494698Kaspars
That was quick, thanks.
I think we’re approaching the main issue here with your last example. It seems that there’s no way to select “cat1” because it doesn’t show up when I select “pages” and then try to locate “cat1”.
January 13, 2023 at 1:31 pm #2494715Ying
StaffCustomer SupportSo I checked the page id, the single-category and single-category/cat1 have the same page id.
Then the location should be pages > single-category.
January 13, 2023 at 1:36 pm #2494718Kaspars
So it means there’s no way to show different content based on hooks for these categories if they have the same id?
I.e. I’d need to show different content for each of these:
– single-category/cat1
– single-category/text
– etc.Is there any workaround?
January 13, 2023 at 2:33 pm #2494748Ying
StaffCustomer SupportSo it means thereās no way to show different content based on hooks for these categories if they have the same id?
That’s correct. GP doesn’t have hooks inside the plugin’s block.
I would recommend reaching out to the plugin’s support to see if they have hooks inside their block, or how to add content into their block.
January 13, 2023 at 2:45 pm #2494751Kaspars
Anyway, thanks a lot for your help.
I’ll try to sort it out with the plugin support team.
January 13, 2023 at 2:58 pm #2494769Ying
StaffCustomer SupportNo problem š
-
AuthorPosts
- You must be logged in to reply to this topic.