Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## first in your functions.php add the following function
- //Shortcode to show the module
- function showmodule_shortcode($moduleid) {
- extract( shortcode_atts( array('id' =>'*'), $moduleid ) );
- return do_shortcode('[et_pb_section global_module="'.$id.'"][/et_pb_section]');
- }
- add_shortcode('showmodule', 'showmodule_shortcode');
- ## then create your single-customCPT.php file duplicating page.php from divi and look for line 45 :
- the_content();
- ## and replace it for
- echo do_shortcode('[showmodule id="YOUR LAYOUT ID"]');
- ## remember: you need to create your divi layout first.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement