Home › Forums › Support › Header Element on custom php search template This topic has 5 replies, 3 voices, and was last updated 5 years ago by David. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts March 25, 2021 at 11:29 am #1709861 Marci Hi, I want a certain header element to show on this page: https://www.ccasa.org/?sfid=18835&_sft_cm_resource_type=legal-options It is using php template file search-cm-resource.php. Right now it is pulling in the wrong header element. It should match the one on this page: https://www.ccasa.org/cm_resource_type/for-survivors/ How can I accomplish this? March 25, 2021 at 5:53 pm #1710099 ElvinStaff Customer Support Hi there, I’m not sure I fully understand what you mean. To clarify: Did you mean the Header Element(page hero) or the actual page header which contains the navigation? The page header containing the navigation looks identical, perhaps its the page hero you’re pertaining to? Let us know. March 26, 2021 at 6:04 am #1710568 Marci I was referring to the Header Element(page hero). March 26, 2021 at 7:45 am #1710915 DavidStaff Customer Support Hi there, are you in control of the search-cm-resource.php template as currently its being recognized as the Blog – theres no body class to show it has its own template tag that could be targetted in the Display Rules. March 26, 2021 at 9:13 am #1711039 Marci I’ve added a body class by adding this in the functions.php add_filter( ‘body_class’,’bz_body_classes’ ); function bz_body_classes( $classes ) { global $template; if ( basename($template) ==’search-cm-resource.php’ ) { $classes[] = ‘search-cm-resource’; } return $classes; } But I don’t see a way to target that template in the Display Rules March 26, 2021 at 1:29 pm #1711253 DavidStaff Customer Support The problem is that the page is using the Blog template – GP doesn’t use body_classes to set where an element is displayed How is that page / template created ? Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In