Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Custom
- function Include_my_php($params = array()) {
- extract(shortcode_atts(array('file' => 'default'), $params));
- ob_start();
- include(get_theme_root() . '/' . get_template() . "/$file.php");
- return ob_get_clean();
- }
- add_shortcode('myphp', 'Include_my_php');
- // Add tag for page.
- function add_tag_to_page() {
- register_taxonomy_for_object_type('post_tag', 'page');
- }
- add_action('init', 'add_tag_to_page');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement