Events Made Easy Forums Tips How to create a search.php template file for Divi

Tagged: ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #64325
    kinghill
    Participant

    Divi does not ship with a search.php. Therefore, we need to create one ourselves if we want to to include EME events in the WordPress search, as described by Franky in the FAQ
    https://www.e-dynamics.be/wordpress/faq/

    All credit for this goes to Mark Hendriksen here ->
    https://www.markhendriksen.com/create-custom-search-result-page/
    He even describes how to add the Divi global header and global footer, as well as any Divi layouts you would like to have on the results page. Very nice. You will also want to add some CSS so that it matches the rest of your site.
    I recommend reading through the entire article, but The very basic steps are as follows

    1. Create a Child theme – there a several guides on the internet, if you are unsure
    2. Find the index.php in the Divi theme folder /wp-content/theme/divi, copy it to your child theme folder and rename it to search.php
    3. Now add Franky’s code from the FAQ to search.php

    That’s it. Enjoy!

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.