• Hi.
    I wonder how to display a ‘hello use the search form for a research’ in search.php.

    I want this message to display only on a first page (not on search results either no-results page).

    Any ideas using no cookies?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Mariusz Szatkowski

    (@motylanogha)

    I tried:

    <?php
    if ( is_page() && !is_search() ) {?>
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    <?php } else { ?>
    
    <?php if (is_search() && is_page('xxx') ) { ?>
    	xxxxxxxxxx
    <?php } elseif ( is_search() && is_page('yyy') ) { ?>
    	yyyy
    <?php } else { ?>
    	zzzzzzzzz
    <?php } ?>
    <?php } ?>

    Thread Starter Mariusz Szatkowski

    (@motylanogha)

    <?php
    if ( !is_search() ) {?>
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    <?php } else { ?>
    
    <?php if (is_search() && is_page('xxx') ) { ?>
    	xxxxxxxxxx
    <?php } elseif ( is_search() && is_page('yyy') ) { ?>
    	yyyy
    <?php } else { ?>
    	zzzzzzzzz
    <?php } ?>
    <?php } ?>

    this code doesn’t seem to work as well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search results with welcome message @start’ is closed to new replies.