Category Loop Module
Written by the Divi Engine Documentation Team
Follow these steps to learn how to use the Category Loop module.
Step 1: Create Custom Fields
Head over to Advanced Custom Fields and create a Field Group. Assign the location to be "Taxonomy is equal to" your Post Type Category. Then click the Add Field button to add custom fields such as the image field.
Step 2: Create categories
Head over to your Post Type and create categories.
Step 3: Add Content To Each Category
Open up each category and add content. You can add the following.
- Any ACF fields that you have added to the categories of this Post Type - such as the image from above.
Step 4: Create A Loop Layout
Make your way to the Divi Library and create a Loop Layout. Currently you can only use the Post Title, ACF Item and Post Content modules.
This module shows the cateogry Name.
- Post Title – “Get Title From” choose “Taxonomy Title”
This module shows any ACF field assigned to the Post Type category.
- ACF Item – "ACF Name" select the custom field. Then “ACF Field From” choose “Current Taxonomy” and then define taxonomy in “Taxonomy Slug” by pasting in the Post Type category slug.
This module shows the category Description.
- Post Content – “Content Type” choose “Taxonomy Description”
Step 5: Add Category Loop Module
Add the Category Loop module to the page of your choice. Then define the following.
- Return Type: Custom Post (you define).
- Post Type: select the Post Type.
- Loop Style: either use the default or use the Loop Layout created above.
- Loop Layout: Select the Loop Layout.
Please email us at [email protected] if you are unable to get Divi Machine working.