Search for: Log In Free Support [Support request] call different Header & Hook Element based on ACF field Home › Forums › Support › call different Header & Hook Element based on ACF field This topic has 3 replies, 2 voices, and was last updated 6 months, 2 weeks ago by David. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts July 3, 2020 at 3:11 am #1350335 Long I want to build two different post layouts so I just set up a True/False Custom Field (ACF field) for Posts, is there any way to load different Header/Hook Elements based on this field? Many thanks July 3, 2020 at 5:58 am #1350466 DavidStaff Customer Support Hi there, you can use the generate_header_element_display and generate_hook_element_display filters: https://docs.generatepress.com/article/generate_header_element_display/ https://docs.generatepress.com/article/generate_hook_element_display/ Then you just need to create a condition based on that field to show or hide the relevant one. My personal approach is to register a Custom Taxonomy which can be used within the Elements display rules. Idea in more detail here: https://generatepress.com/forums/topic/disabling-element-using-page-editor-metabox/#post-980207 Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ July 10, 2020 at 2:11 am #1358770 Long Dear David Many thanks for your ideal solution. It works great for me! July 10, 2020 at 2:55 am #1358804 DavidStaff Customer Support Glad to hear that. Documentation: http://docs.generatepress.com/ Adding CSS: http://docs.generatepress.com/article/adding-css/ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In