Last active
December 13, 2015 18:38
-
-
Save ckpicker/4956646 to your computer and use it in GitHub Desktop.
Add this code to your functions.php file. Make sure you upload 'description-count.js' to the following directory: 'YOUR_THEME_DIRECTORY/js/'
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
// Add our special description count js | |
add_action( 'wp_enqueue_scripts', 'our_admin_scripts' ); | |
function our_admin_scripts( $hook ) { | |
global $post_type; | |
if( tribe_is_community_edit_event_page() ) { // So this only works for posts, would need to edit for events custom post type | |
$js_dir = trailingslashit( get_template_directory_uri() ) . 'js/'; | |
wp_register_script('our-admin-js', $js_dir . 'description-count.js', array('jquery'), null); | |
wp_enqueue_script('our-admin-js'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment