Customizing search results
To customize the number of search results displayed per page, follow these steps:- Log in to WordPress as the administrator.
-
On the Dashboard in the left sidebar, click Appearance, and then click Theme Editor:
- In the right sidebar, under Theme Files, click Theme Functions (functions.php).
- Copy the following code snippet and then paste it at the bottom of the functions.php file:
- Click Update File. WordPress saves the changes to the functions.php file. To test the new code, do a search and confirm that the correct number of results appears per page.
.jpg?fit=max&auto=format&n=E2LlsT5gBITvo732&q=85&s=ec11e1673894bdf46663a5d73602eb87)