• 0

DMS 2 Custom Search Results Page


Question

Posted · Report post

I am wanting to create a custom results page. I have managed to get something close to what I am after by editing section.php within the postloop folder.

 

I get the feeling though that this is not the best way to go about it as changes made to this also effect standard pages and posts, i have been able to hide my search results excepts from these via css but doing so only increases my suspicion that this is not the way to go.

 

Many themes have a search.php file which I understand in some cases can allow you to change the way a search results page is displayed. I can't see anything that looks like this in the wp dashboards' appearance/editor and not such file exists in the theme's section folders.

 

So the question really is - What would you recommend using to create a customised search results page?

 

I would also like to add the search term and number of "hits" at the top of the results page. Using the Posts info section only displays the search term.

 

Also, the Pagination section only displays "previous entries" and "next entries" which is nothing like what you get at the bottom of a google search or for that matter what is represented by the sections own icon. Is there a way to customise this?

 

 

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

Posted · Report post

Hi,

 

Well it depends on what you're trying to do, how do you want your search results to display ? As I can't see anything on those screenshots that would suggest you have made some changes ?

 

Also, we do not provide support to users who have made changes to the core files, which it sounds like you have.

For me personally, I would either (again not sure what it is you're trying to achieve, so I'm just taking a guess) create my own custom section for search results or use a plugin. The Relevanssi plugin is quite good and comes with a number of options allowing you to customize how your results perform and display.

 

https://wordpress.org/plugins/relevanssi/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now