Community Forums › Forums › Archived Forums › Design Tips and Tricks › number of results returned in search results page
Tagged: is_search, pre_get_posts, search results
- This topic has 9 replies, 3 voices, and was last updated 7 years, 5 months ago by
Yohanaton.
-
AuthorPosts
-
November 4, 2018 at 6:13 pm #224172
Yohanaton
MemberHi folks, thanks for taking a sec.
https://sf115jtn.prodev.host/search/
Where can I define how many results are returned per search on the search results page?
Thank you!!!!!November 5, 2018 at 12:09 am #224176Brad Dalton
ParticipantNovember 5, 2018 at 7:50 am #224185Yohanaton
MemberHi Braddalto,
Thanks for your reply!
Are you suggesting I can find the number to edit on the functions php file?
- or perhaps something else?
Any further insight would be greatly appreciated.
Thank you!November 5, 2018 at 1:07 pm #224195Victor Font
ModeratorYou can change the number on the Genesis Theme Settings page in the Blog Page Template area, and also on the WordPress admin Settings/Reading page.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?November 5, 2018 at 1:20 pm #224196Yohanaton
MemberHi Victor,
Thanks for jumping in.
- I've got both of those set to 10, but yet only 2 results are showing up...
Wondering what else I can try to overwrite this...
Thoughts?
- Thank you!!November 6, 2018 at 6:49 am #224201Victor Font
ModeratorI doubt that your issue has anything to do with the Genesis Framework or WordPress for that matter. When I checked your search page, you are using a 3rd party search plugin as indicated by the search query string, maybe the Divi page builder perhaps? I suggest you contact Divi support for further assistance. I don't think this is anything we can help you with.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?November 6, 2018 at 10:49 am #224202Brad Dalton
ParticipantYou could add a code snippet in your child themes functions.php file using the is_search conditional tag with the pre_get_posts hook and the posts_per_page parameter.
https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
November 6, 2018 at 11:54 am #224204Victor Font
ModeratorThere's something else going on with that site Brad. I searched for the word "frog" and there were 10 pages of results. Half the pages had no content.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?November 6, 2018 at 12:00 pm #224205Brad Dalton
ParticipantHello Victor. Yes. Maybe they're trying some code, plugin or modification already.
November 7, 2018 at 8:20 am #224215Yohanaton
MemberHi Guys,
Thanks so much for your help.
- Yeah, not sure what's going on... and yes.. it's the divi builder plugin.
Will reach out to them for help.
Thank you!!! -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.