Search Layout Injector
The Search Layout Injector plugin is designed to allow you to set up a custom layout for your boring old Divi search results page within WordPress. Much like the popular Woo Layout Injector plugin, you can use the Divi Library to set up a layout. Making use of many new custom Divi Builder Modules designed for this plugin you can set up your results page (featuring a new List layout along with Grid and Full width, much like the standard ‘blog’ module) without the need to do any coding at all.
A lot of sites demand consistency across the site and where you use the search so, using this plugin, you can easily configure the standard layout of your posts, pages and CPT. You can see this in action on elegantmarketplace.com whereby this plugin is used on the blog archive page and also individual blog posts.
- Install and Activate the plugin
- Visit the ‘Divi Library’ page on the back end of your website
- Click add new (towards the top of the page) and choose ‘layout’ from the little popup (NOT Global). Give it a memorable name (this is for reference only and is never used elsewhere)
- Use the page builder to create your layout using the modules provided and save it
- Visit the settings page for the plugin and simply choose the new layout from the dropdown relating to the search results
- That’s it!
Each time you want to make a change to the layout just visit the Divi Library page and edit your layout as before. No need to relink or anything else. This really is a set and forget plugin!
- Title. Adds the name of the post type item along with any meta information such as author, comment count, categories and the post date.
- Content. Shows the content from the post type item
- Featured Image. Self explanatory.
- Search Archive. This is much like the ‘blog’ module that comes with Divi/Extra but with a couple of neat additions. Post type selection, a List style layout and image size selection
- Search Loop Archive. This is a special module designed to use a layout within a layout. You simply create an archive layout and a loop item layout. The loop item can contain any other modules or layouts as you see fit and will be repeated for each item forming a neat archive page in any layout you like. As seen on my popular Woo Layout Injector plugin. Works brilliantly with my ACF plugin to show detailed information about your content.
All modules feature styling controls via the Advanced Design Settings page within the Divi Builder.
If you use the divi builder for your blog posts you should ideally write into the ‘excerpt’ box as well which means that the search results page can show a short summary of th content. If you don’t then the excerpt will be blank in most cases. This advice is not specific to this plugin but a general rule of thumb.