Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. // Custom
  2. function Include_my_php($params = array()) {
  3. extract(shortcode_atts(array('file' => 'default'), $params));
  4. ob_start();
  5. include(get_theme_root() . '/' . get_template() . "/$file.php");
  6. return ob_get_clean();
  7. }
  8. add_shortcode('myphp', 'Include_my_php');
  9.  
  10. // Add tag for page.
  11.  
  12. function add_tag_to_page() {
  13. register_taxonomy_for_object_type('post_tag', 'page');
  14. }
  15. add_action('init', 'add_tag_to_page');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement