All Collections
FAQ's and Troubleshooting
Customizing Divi Blog module to add Custom Fields
Customizing Divi Blog module to add Custom Fields

You'll learn how to customize the default Divi Blog Module to add custom fields.

Rijendra avatar
Written by Rijendra
Updated over a week ago

These changes require installing a Divi child theme with a Blog module inside. Check the following article if you don't have a child theme with the Blog module in it yet:
​Moving the blog module to child theme article

Next, open up includes/Blog.php file from the child theme folder and search for this code:

echo '<div class="post-content">';

Note: You can find this specific line in 2 places on the same file.
You should edit the 2nd part mostly around line no. 1559 as shown in the screenshot below:

Add your custom fields code just below it like this:

$my_key1 = get_post_meta($post->ID, 'my_key1', true) ? get_post_meta($post->ID, 'my_key1', true) : "";
if($my_key1 != "") {
echo '<div class="mykey1">'. $my_key1 . '</div>';
}

Add more meta keys from your custom fields and custom CSS class to customize it as required πŸ˜ƒ

You can learn more about WordPress custom fields here:

Did this answer your question?