Skip to content

Instantly share code, notes, and snippets.

@alexkingorg
Created February 6, 2014 20:52
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 alexkingorg/8852267 to your computer and use it in GitHub Desktop.
Save alexkingorg/8852267 to your computer and use it in GitHub Desktop.
Enable tags for pages (old code archive) for WordPress.
<?php
/*
Plugin Name: CF Page Tags
Plugin URI: http://crowdfavorite.com/wordpress/
Description: Add the tags form to pages in WP.
Author: Crowd Favorite
Author URI: http://crowdfavorite.com
Version: 1.0
*/
function cf_post_tags_meta_box($post) {
?>
<p id="jaxtag"><label class="hidden" for="newtag"><?php _e('Tags'); ?></label><input type="text" name="tags_input" class="tags-input" id="tags-input" size="40" tabindex="3" value="<?php echo get_tags_to_edit( $post->ID ); ?>" /></p>
<div id="tagchecklist"></div>
<?php
}
function cf_page_tags() {
add_meta_box('tagsdiv', __('Tags'), 'cf_post_tags_meta_box', 'page', 'normal', 'core');
}
add_action('admin_head', 'cf_page_tags');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment