Skip to content

Instantly share code, notes, and snippets.

@eudesgit
Created February 13, 2018 19:26
Show Gist options
  • Save eudesgit/5a7739844cb2be77911fe342a1ce3da3 to your computer and use it in GitHub Desktop.
Save eudesgit/5a7739844cb2be77911fe342a1ce3da3 to your computer and use it in GitHub Desktop.
How to get WP file header data for a page template
<?php
// Gets Template Name from the file
$filedata = get_file_data($full_path, array(
'Template Name' => 'Template Name',
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment