CPT Layout Injector
**********Fully Compatible with the Visual Builder & Gutenberg**********
Watch the video for an explanation of what the plugin does and what can be achieved. Think of this as a must have Divi Layout/Template Manager for blog posts, pages and other custom post types. This plugin is a MUST HAVE for any site.
The CPT Layout Injector plugin is designed to allow you to set up centralised and custom layouts for any Custom Post Type within WordPress, basically, make a template for each of your post types – including straight up WordPress posts. Much like the popular Woo Layout Injector plugin, you can use the Divi Library to set up different layouts. Making use of many new custom Divi Builder Modules designed for this plugin you can set up archives (featuring a new List layout along with Grid and Full width, much like the standard ‘blog’ module) and single page templates in minutes without the need to do any coding at all. You can even have a layout per category that your posts belong to if you like so one layout for those posts in category 1 but another for category 2 etc. It’s INCREDIBLY VERSATILE!
Although this is designed for Custom Post Types, I often use it for blog pages and blog archives using the inbuilt ‘posts’ Post Type. Although the Divi Builder can be used for posts I don’t feel that it’s generally necessary to do so. A lot of sites demand consistency across blogs and news pages and 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.
NOTE: For post types where the Divi Builder is active, the CPT Injector layout will only be used for posts where the builder has not been used. This gives you the flexibility to have a nice consistent and stylish looking blog/news page but with the builder used on some pieces of content where necessary… great eh!!
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 for the appropriate Custom Post Type
Repeat steps 2-5 for the archive page (the page where you see more than one item together)
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.
Post Nav. This shows the next/prev navigation to move between your post type items where required
CPT 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
CPT 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.
Taxonomy. This will allow you to show a list of taxonomy items attached.. (eg.. a list of categories or tags for instance)
Author Bio. Introducing the author bio module.. this contains biographical information, the avatar, social media and website address as well as a selection of styling options to make this feature really sing!
All modules feature styling controls via the Advanced Design Settings page within the Divi Builder