How to add a global footer to Divi theme

TIPS

Aug 16, 2018 | Divi Tips | 0 comments

IMPORTANT! This method is out dated! You should be using the Divi theme builder to make a custom global footer.

Ever wonder how to make a global footer layout that will appear on all pages in your Divi theme?

You could make a global Divi library layout and add it to each page. But, that doesn’t work on blog categories or posts if you have a sidebar. The global section will appear on the left column and not full width.

What if you want your footer layout to appear below the footer widgets? Or maybe somewhere else other than directly below the main content?

I’ll show you 2 methods. One uses the functions.php file and places your footer layout directly below your main content, above all the default footer stuff (widgets, menu, copyright, etc).

Option 1:

Make a footer layout in your Divi Library and save it as global.

Look in your address bar at the URL when editing your layout. It will contain the post ID like this post=1234. Copy your post ID and replace the 1234 in the code below with yours.

[php]
function dl_custom_footer() {
    echo do_shortcode('[et_pb_section global_module="1234"][/et_pb_section]');
}
add_action('et_after_main_content', 'dl_custom_footer');
[/php]

Option 2:

Copy the footer.php file from the Divi theme folder and paste it into your child theme folder.

Add the following PHP code wherever you like.

[php]
echo do_shortcode('[et_pb_section global_module="1234"][/et_pb_section]');
[/php]

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

More Tips

Ad - Web Hosting from SiteGround - Crafted for easy site management. Click to learn more.

Cloudways Hosting

WPEngine Hosting

Pressable Hosting

AccuWeb Hosting

Ask the Divi Guy a Question

"*" indicates required fields