PHP – WordPress – Get the Current Page Template Name

This following PHP example helps you to get the current page templage name in WordPress.

Code Example:

global $post;
$page_tempate_name = get_post_meta($post->ID,'_wp_page_template',true) 

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *