This topic is: resolved
- This topic has 24 replies, 3 voices, and was last updated 12 years ago by .
- The topic ‘Customizing search results page for use with Relevanssi’ is closed to new replies.
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.
Community Forums › Forums › Archived Forums › Design Tips and Tricks › Customizing search results page for use with Relevanssi
Glad it worked out the way you wanted.
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
I just noticed that this solution is not mobile responsive. When using my iPad in portrait mode the Relevanssi output appears *below* the sidebar contents, just above the footer. I"ll try putting some additional css styling in the viewport for smaller displays. Maybe that will to the trick.
That's happening because right now, the order of the divs is content...sidebar...didyoumean (the Relevanssi function). You need to see if you can change that content...didyoumean...sidebar. Since the default priority is 10, try a priority that is > 5 but < 10 to see if that helps get that order. (You can see the order using a tool like Firebug for Firefox.)
With the right order, it is a matter of then adjusting the mobile responsive styling for the didyoumean ID's, which will be found in a series of media queries at the bottom of your child theme's stylesheet. In general, didyoumean should have the many of the same properties as #content.
Web: https://wpperform.com or Twitter: @wpperform
We do managed WordPress hosting.
Thank you Bill. Will try and experiment a bit to find the best result.
Guys, you are simply wonderful. Thank you very much for your great dialogue. Here you are my final code:
// add to child theme functions.php after the call to init.php and before the closing tag (if it exists)
add_action('genesis_before_content', 'wpp_relevanssi_did_you_mean', 5);
function wpp_relevanssi_did_you_mean() {
if ( is_search() ) {
if (function_exists('relevanssi_didyoumean')) {
relevanssi_didyoumean(get_search_query(), "<div id='didyoumean' style='font-size:20px; padding-bottom:10px;'>Forse intendevi: ", "</div>", 5);
}
}
}
I'd like to show you final result but the site is in development and well... "Forse intendevi" is italian!
Thank you!
My Last Work: Studio Notarile Arcoleo
© 2025 WPEngine, Inc.