Site logo

Archived topic

elements including templates in display rules

3 replies · Started by eric on August 22, 2018

Viewing posts 1–4 of 4

Hi,

Love the theme and the new elements module. I create my own templates for most of the sites I create. Is it possible to have the hooks only apply to pages or posts that use specific templates? Thanks in advance,

Hi there,

If I understand this correctly, you need something more specific than the Display Rule in Elements has to offer?

If so you will can try using the filters and set the conditional tags however you like:
https://docs.generatepress.com/article/generate_layout_element_display/
https://docs.generatepress.com/article/generate_hook_element_display/
https://docs.generatepress.com/article/generate_header_element_display/
https://codex.wordpress.org/Conditional_Tags

Let me know if this helps :)

Fantastic, saved me posting as I read the similar posts just at the last minute suggestion (it works)

Glad you found the post useful :)

This archived topic is closed to new replies.