Skip to content

Instantly share code, notes, and snippets.

@cjwd-snippets
Last active December 13, 2016 21:47
Show Gist options
  • Select an option

  • Save cjwd-snippets/5e0f29e3ab2c7e8ee07e883d921616b8 to your computer and use it in GitHub Desktop.

Select an option

Save cjwd-snippets/5e0f29e3ab2c7e8ee07e883d921616b8 to your computer and use it in GitHub Desktop.
Function to print sage's main and base templates
<?php
use Vault\Sage\Wrapper;
function sage_wrap_info() {
$format = '<h6>The %s template being used is: %s</h6>';
$main = Wrapper\SpringWrapping::$main_template;
global $template;
printf($format, 'Main', $main);
printf($format, 'Base', $template);
}
add_action('wp_footer', __NAMESPACE__ . '\\sage_wrap_info');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment