Community Forums › Forums › Archived Forums › General Discussion › Change WordPress Search Results page
Tagged: custom search results, search results, search.php
- This topic has 1 reply, 1 voice, and was last updated 6 years, 8 months ago by lizmsolutions.
-
AuthorPosts
-
January 24, 2018 at 6:26 pm #215715lizmsolutionsParticipant
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=10002but, 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=10002January 24, 2018 at 6:39 pm #215716lizmsolutionsParticipantUpdate - 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
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.