| | 1263 | * Get the specific template name for a page. |
| | 1264 | * |
| | 1265 | * @param string $id The page ID to check. If not provided, will use current page |
| | 1266 | * @return string The specific template name if success, bool False on failure |
| | 1267 | */ |
| | 1268 | function get_the_page_template( $id = '' ) { |
| | 1269 | if( !is_page() ) |
| | 1270 | return false; |
| | 1271 | |
| | 1272 | if( empty( $id ) ) |
| | 1273 | $id = get_queried_object_id(); |
| | 1274 | |
| | 1275 | $page_template = get_post_meta( $id, '_wp_page_template', true ); |
| | 1276 | if( !empty( $page_template ) ) |
| | 1277 | return $page_template; |
| | 1278 | else |
| | 1279 | return false; |
| | 1280 | } |
| | 1281 | |
| | 1282 | |
| | 1283 | /** |