I am attempting to compare a username to a page template name. I found the following code:
get_post_meta( $post->ID, '_wp_page_template', true );
But this isn't quite what I am looking for. This returns the filename of the page template, IE:
templates/page-products.php
What I am looking for is the actual template name defined in the page template here:
/*
Template Name: products
*/
Is this possible?