Skip to content

Instantly share code, notes, and snippets.

@corradomatt
Last active December 20, 2015 05:59
Show Gist options
  • Save corradomatt/6082677 to your computer and use it in GitHub Desktop.
Save corradomatt/6082677 to your computer and use it in GitHub Desktop.
WordPress template file commenting for developers who want to help us out with which file is loading parts of a page.
<?php
// Beginning of File
begin_template( __FILE__ );
// End of File
end_template( __FILE__ );
function begin_template( $file ){
?> <!-- begin <?php echo basename( $file ) . " [".basename( dirname( $file ) ) ."]" ; ?> -->
<?php
}
function end_template( $file ){
?><!-- end <?php echo basename( $file ); ?> -->
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment