Skip to content

Instantly share code, notes, and snippets.

@seandenigris
Created June 15, 2016 01:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seandenigris/e2742992e4875a33be341de74c976410 to your computer and use it in GitHub Desktop.
Save seandenigris/e2742992e4875a33be341de74c976410 to your computer and use it in GitHub Desktop.
Campaign Site Theme Functions
function myplugin_settings() {
// Add tag metabox to page
register_taxonomy_for_object_type('post_tag', 'page');
// Add category metabox to page
register_taxonomy_for_object_type('category', 'page');
}
// Add to the admin_init hook of your theme functions.php file
add_action( 'init', 'myplugin_settings' );
//Remove admin bar (From http://www.instantshift.com/2012/03/06/21-most-useful-wordpress-admin-page-hacks/)
if (!current_user_can('manage_options')) {
add_filter('show_admin_bar', '__return_false');
}
// Add Head Tags (from https://wordpress.org/support/topic/adding-html-meta-tags-in-the-header)
add_action('wp_head', 'my_head_tags');
function my_head_tags()
{
echo '<meta property="og:image" content="http://seanfor273.com/wp-content/uploads/2016/06/Home-Screenshot.jpg" />';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment