Site logo

Archived topic

Search box for blog post

9 replies · Started by Giacomo on January 20, 2018

Viewing posts 1–10 of 10

Hello, i need to add search box for BLOG POST in GP hooks

like this

Search box

or like this

Search box

can someone help me with the code please?

Hi there,

Try:

<?php if ( is_single() ) { 
    get_search_form();
} ?>

okay, i try but don't work

Did you check Execute PHP?

I just tried the exact code in hooks and it worked.

i try to copy the code in hook

Test

but search box don't appears

test

Which hook is that? can you link me to the page?

i try copy the code in:
- after header hook
and
- inside content container hook

https://grement.com/

sorry man,
now it works perfectly but if I need to view this in all the pages?

To show on all pages? You can just remove the conditional tag:
get_search_form();

This archived topic is closed to new replies.