How to inject a Divi Layout in Divi Business Pro's 404 page
Making a mistake while editing PHP files
could crash your site,
BEFORE ATTEMPTING THIS!
This will add your Divi layout below the page title, replacing existing content.
Here's what you need to do:
- Take your 404 page designed in Divi and save the layout to the library
- Navigate to Appearance >>> Editor
- On the right sidebar find 404.php and click on the link to open the template
- Select all content from line 18 to line 31 and delete it
- In place of the deleted content add this line:
<?php echo do_shortcode('[et_pb_section global_module="MY LAYOUT ID"][/et_pb_section]'); ?>
- Replace MY LAYOUT ID for the ID of the library item that is your 404 design
After performing steps 4-6, It will look like this:
- UPDATE FILE