Can anyone give me the right way to loop in search results? I’ve got the search.php page in place, and that’s working, but I can’t get the dang results to display. If I remove the search.php page altogether, then results show minus my styling, so search is working…I’m just doing something wrong.
Have searched around and just not getting anywhere.
If you duplicate
index.php and rename it
search.php then you’ll have a working loop.
You are the man, and I, evidently, am a brain donor. Thanks dude.
For anyone new to this, I was trying to style Wordpress search results.
To do that, create a search.php file with your theme styling, and then take the contents of index.php (in the Roots theme folder) and place the contents into your search.php page (minus the very top php get template statement unless that works for your theme styling).
Is your custom post type in the templates folder or is it a seperate single?
you can have base-single to call out the post seperately.
So you would want a single-hotels and a base-single-hotels
I believe that could work.
I solved the issue with a workaround but its still not an optimum solution. please see: