How can I add a banner to the search page?

want to add a banner at the top of the search page, but I couldn’t find the right file to modify. I tried creating a hook, but it didn’t work. Is there a proper hook or a file that I can override in the child theme to add this banner?

Thank you in advance! :folded_hands:

I also add an image.

Here is the hook I tried to use:

add_filter(
    'hivepress/v1/templates/listings_view_page',
    function($template){
        return hivepress()->template->merge_blocks(
            $template,
            [
                'search_banner' => [
                    'type'       => 'part',
                    'path'       => 'custom-parts/search-banner',
                    '_order'     => 5,
                    'attributes' => [],
                ],
            ]
        );
    },
    1000
);

Hello and welcome Emn,

I found this, searching in the forum (next time try it too) :

Hope this helps.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.