Viewing 2 replies - 1 through 2 (of 2 total)
  • Read this http://codex.ww.wp.xz.cn/Creating_a_Search_Page
    Try with this code

    <?php
    if( trim( wp_specialchars($s,1) ) == ‘wordpress’ ) :?>
    [ Show XYZ ]
    <?php elseif( trim( wp_specialchars($s,1) ) == ‘plugin’ ) :?>
    [ Show ABC ]
    endif;
    ?>

    Thread Starter perfectlover

    (@perfectlover)

    Thanks,

    Actually search I used just an example, is it possible to define url? I am using a premium theme where categories are in custom post type and i want to use different content on different category.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘conditional statment based on URL’ is closed to new replies.