1. PROMO Upgrade to Pro Membership @ $99 / Lifetime & access all our 16+ premium Divi extensions: Divi Block, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Divi loads the default header and footer on search template

Discussion in 'Free Divi Community Forum' started by Alfred Balles, Aug 8, 2024.

  1. Alfred Balles

    Alfred Balles New Member

    We use Divi for our pages and we use custom template for our custom pages and custom post type and we wanted for tags to be included in the search so we used WP Extended Search. The plugin is working but then Divi loads the default header and footer for the search results page: https://ansicvpn.com/?s=testing&post_type=courses. I tried creating a template in DIvi for search results but it didn't solve the issue. Also we use a custom template for our search. Please help us.
     
    1. PRO MEMBER PERKS Divi Login Customizer Plugin - Instantly beautify your Wordpress login page with 6 premade designs:Learn More
  2. Divi.Help

    Divi.Help Administrator
    Staff Member

    In your Divi Theme Builder, did you create a global header?

    If yes, then in the Divi Theme Builder, did you have a search template created?

    If yes, check if the global header is in the search template.
     
  3. Alfred Balles

    Alfred Balles New Member

    In your Divi Theme Builder, did you create a global header? - Yes

    If yes, then in the Divi Theme Builder, did you have a search template created? - I have tried this but this is not working. Divi still loads the default header and footer


    How can I force Divi to load the global header and footer on a specific custom template e.g. archive-search.php?
     
    1. PRO MEMBER PERKS Custom Color Scheme + Premade Layouts - A perfect combination to boost productivity:Try Now
  4. Divi.Help

    Divi.Help Administrator
    Staff Member

    Kindly share screenshot on your Divi Theme Builder search template.
    **You should have Global Header in the search template for it to work.
     
  5. Alfred Balles

    Alfred Balles New Member

    upload_2024-8-12_13-42-34.png
    Here is the screenshot. As I have said, this is not working since we are using a custom template file for the search results
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade slide in bar design for your Divi site without using any plugins:View Demo
  6. Divi.Help

    Divi.Help Administrator
    Staff Member

    If that's the case, you can only inject Divi Library item into your custom search PHP template.

    Here's a sample:
    <?php echo do_shortcode('[et_pb_section global_module="888"][/et_pb_section]'); ?>

    You will need to replace 888 into your Divi Library item ID, which can be found in the URL of the library item: /wp-admin/post.php?post=12345&action=edit
    **For example, the above ID is 12345

    Do note that you will need to first create a new Divi Library layout item & paste your global header sections in it. Then follow by the steps above.
     
  7. Alfred Balles

    Alfred Balles New Member

    It shows a messed up header and footer. Seems like the CSS styling is not being loaded and it still shows the default header and footer.

    upload_2024-10-8_13-51-57.png
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Digital Marketing' Divi layout for all Pro members:View Demo