Last active
May 17, 2017 02:24
-
-
Save yogoeasy/dec58309e4797e67965c88802baa44e1 to your computer and use it in GitHub Desktop.
將Divi Library的模組用shortcode的方式插入文章
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* 將Divi Library的模組用shortcode的方式插入文章 */ | |
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'); | |
//by 優易教學網 https://www.yogoeasy.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment