How to use wordpress shortcodes in custom php file?
问题 I want to display wpdatatables(plugin) in my custom PHP file so I wanted to use "do_shortcode()" function but nothing works it just shows white screen. my php file code: <?php $path = $_SERVER['DOCUMENT_ROOT']; include_once $path . '/wp-config.php'; include_once $path . '/wp-load.php'; include_once $path . '/wp-includes/wp-db.php'; include_once $path . '/wp-includes/pluggable.php'; define('WP_USE_THEMES', false); echo do_shortcode("[wpdatatable id=1]"); ?> 回答1: I think somehow you are not