Guest User

Untitled

a guest
Sep 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?
  2.  
  3. $post_id = 0;
  4.  
  5. $template_file = "";
  6. if ( isset($_GET['action']) ) :
  7.  
  8.     if ($_GET['action'] == 'edit' ) {
  9.         if ( isset( $_GET['post'] ) ) $post_id = $_GET['post'];
  10.             elseif ( isset( $_POST['post_ID'] ) ) $post_id = $_POST['post_ID'];
  11.         if ( isset($post_id) ) $template_file = get_post_meta($post_id,'_wp_page_template',TRUE);
  12.     }
  13.    
  14. endif;
  15.  
  16.  
  17.  
  18. if ($template_file == 'page-a-usina.php') :
  19.  
  20.     .........
  21.  
  22. endif;
  23.  
  24.  
  25. ?>
Add Comment
Please, Sign In to add comment