Created
June 15, 2016 01:16
-
-
Save seandenigris/e2742992e4875a33be341de74c976410 to your computer and use it in GitHub Desktop.
Campaign Site Theme Functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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