Site logo

Archived topic

GP Elements - Add block on Categories Page

14 replies · Started by Yurik on April 26, 2021

Viewing posts 1–15 of 15

Hi,

I'm trying to add some content to display on specific Categories pages by using Elements. But I cannot find the way to make these displaying just on specific pages/categories.

For example, I have 5 different categories and the required block should only appear on categories 1,2,4 and 5, but hide on 3rd.

I have tried different options by building and setting up via elements, but can't find the way to make it hidden on a specific category. I have added few screenshots and highlighted what I mean.

img 1
img 2
img 3

Also, I would like to show this block after the category name, but trying available Hooks in Elements setup, I couldn't find any, which can bring the block into this position. Con you help to make it please?

img4

Thanks

I have disabled the block on live site

Hi Ying,

Thank you for quick response! I have tried the offered option, but the content not appears.

img

I have left the element enable, so you can visit the link and debug. Let me know if you need any additional details.

Hope you can help.

Thanks

NOT post category, butpost category archive.

Sorry - I've made a mistake on the location! I have post category archive and it resolved my problem with location. However, if I'm selecting the generate_after_archive_title as hook, it still not appears after the category name.

For example by selecting generate_after_navigation it apers just after the header.

Please have a look, I have now enabled two Elements "Block - Hook" with 2 different hooks generate_after_archive_title and generate_after_navigation

Thanks

I see, since you are using Header element to display the title, the default title is disabled, that's why generate_after_archive_titledoesn't work.

Give generate_before_main_content a try :)

I have used this hook generate_before_main_content before, but it worked overlapping the content (see the below screenshot).

https://ibb.co/N285GYx

I'm not sure why this happening (maybe something with styles, not sure)....

Do you know how to fix?

It should not cause this issue, have you add any CSS to position shortcode content?

Could you activate the hook for me to inspect the issue?

Thanks!

It is activated. Please visit the same link

I don't see it, could you clear cache?

That's weird, the generate_before_main_content hook should not insert content to the current position.

Can you try generate_inside_site_container?

Nice!

You are very welcome :)

This archived topic is closed to new replies.