Site logo

Archived topic

Header Element on custom php search template

5 replies · Started by Marci on March 25, 2021

Viewing posts 1–6 of 6

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.

I was referring to the Header Element(page hero).

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.

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

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 ?

This archived topic is closed to new replies.