WordPress.org

Ready to get started?Download WordPress

Forums

Remove PAGES from SEARCH RESULTS? (3 posts)

  1. neodan
    Member
    Posted 1 year ago #

    Hello WordPress Community!

    Can someone help me in removing the pages from search results:
    http://ragetracks.com/?s=rage

    Here is my search.php code:

    <?php
    global $blogConf, $permalink, $is_search;
    $permalink = false;
    $is_search = true;
    
    get_template_part('single','config');
    
    $blogConf['title'] = __('Nothing found', 'themeton');
    if (have_posts ()){
        $blogConf['title'] = __('Search result for', 'themeton') . ' : ' . '<span>' . get_search_query() . '</span>';
    }?>
    
    <?php get_header();?>
    
    <?php get_template_part('content', 'main');?>
    
    <?php get_footer();?>

    Thank you for your time

  2. neodan
    Member
    Posted 1 year ago #

    Bump

  3. neodan
    Member
    Posted 1 year ago #

    Is this even the right php code? Should I post loop.php?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags