Get The Current Page Template Name in WordPress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. global $post;
  2. $page_tempate_name = get_post_meta($post->ID,'_wp_page_template',true);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.