possible to use is_page() for search?
-
Hi
I want to show my code only on 2 pages. One is ‘products’ and the other one is ‘search’ (the default search page of wordpress).
I Tried it like this:
<?php if (is_page('products') || is_page('search') ) : ?> // do stuffs <?php endif; ?>
I get it worked for the page ‘products’ but not for ‘search’.
The URL of my search page would e.g. look like this: search/anything. In this case ‘anything’ would be the search keyword.Any way I could get this worked?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘possible to use is_page() for search?’ is closed to new replies.