Site logo

Archived topic

Search Query - Dynamic Data

1 reply · Started by Jeffrey on February 19, 2023

Viewing posts 1–2 of 2

I am currently editing the search results page.
I have created Block - Loop Template.

All looks good but there are only search results and I can't show "Search Results for: keyword".
I can't find how to add "keyword" dynamically (Default Wordpress has it but my Block - Loop Template does not).

Hi there,

for now you need to create a shortcode with this PHP Snippet:

add_shortcode('search_term', function(){
    return get_search_query();
});

then you can add the [search_term] inside a Headline block in the block element

This archived topic is closed to new replies.