• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Change WordPress Search Results page

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Change WordPress Search Results page

This topic is: resolved

Tagged: custom search results, search results, search.php

  • This topic has 1 reply, 1 voice, and was last updated 7 years, 4 months ago by lizmsolutions.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 24, 2018 at 6:26 pm #215715
    lizmsolutions
    Participant

    I am working with the Refined-Pro theme and I'm trying to edit the search.php so that when someone executes a search the results shows the FULL content of the post, not just the excerpt and then forcing someone to click "read more" or the title in order to see the whole thing. I am certain that this is something simple, but for some reason the exact code for this search.php is escaping me.
    Below is what I'm starting with -

    <?php
    /**
     * Genesis Framework.
     *
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     *
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/genesis/
     */
    
    add_action( 'genesis_before_loop', 'genesis_do_search_title' );
    /**
     * Echo the title with the search term.
     *
     * @since 1.9.0
     */
    function genesis_do_search_title() {
    
    	$title = sprintf( '<div class="archive-description"><h1 class="archive-title">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search Results for:', 'genesis' ) ), get_search_query() );
    
    	echo apply_filters( 'genesis_search_title_output', $content ) . "\n";
    
    }
    
    genesis();
    

    this is the search results page I am getting - for a search of zip code: 10002 -
    http://lizmcreations.com/wintersgroupnew/?s=10002

    but, what I want it to output is: http://lizmcreations.com/wintersgroupnew/?sales_reps=vicki-gillman this page directly.

    Thank you in advance for your assistance.

    Elizabeth Martinez

    http://lizmcreations.com/wintersgroupnew/?s=10002
    January 24, 2018 at 6:39 pm #215716
    lizmsolutions
    Participant

    Update - I copied the wrong code - this is what I'm using -

    <?php
    /**
     * Genesis Framework.
     *
     * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
     * Please do all modifications in the form of a child theme.
     *
     * @package Genesis\Templates
     * @author  StudioPress
     * @license GPL-2.0+
     * @link    http://my.studiopress.com/themes/genesis/
     */
    
    add_action( 'genesis_before_loop', 'genesis_do_search_title' );
    /**
     * Echo the title with the search term.
     *
     * @since 1.9.0
     */
    function genesis_do_search_title() {
    
    	$title = sprintf( '<div class="archive-description"><h1 class="archive-title">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search Results for:', 'genesis' ) ), get_search_query() );
    
    	echo apply_filters( 'genesis_search_title_output', $title ) . "\n";
    
    }
    
    genesis();
    

    forgot to revert a change. I don't need the "search results for" heading, just the whole content of the post...

    Thank you again...

    Liz Martinez

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble