Custom Taxonomy-specific JavaScript

For a function that enqueues scripts, the action hook you use should actually be “wp_enqueue_scripts” for the front of the site, and “admin_enqueue_scripts” for the admin side of things. This is the proper time to enqueue scripts. While you can technically do it anytime before wp_head, this is the best place because it’s pretty much … Read more

How to Make a Separate RSS Feed for Each Custom Post Type

add the small example function: add_action( ‘request’, ‘fb_add_to_feed’ ); // add to post-feed function fb_add_to_feed($request) { if ( isset($request[‘feed’]) && !isset($request[‘post_type’]) ) { $request[‘post_type’] = get_post_types( $args = array( ‘public’ => true, ‘capability_type’ => ‘post’ ) ); } return $request; } Alternative you can creat a own feed onl yfor the custom post type. See … Read more

Why does my custom taxonomy show a total count across all post types

There is currently a trac ticket on the fact that taxonomy counts are global (include all post types). Related trac ticket. To fix this you can remove the column and add your own using the manage_edit-{$taxonomy}_columns filter: add_filter(‘manage_edit-season_columns’,’my_season_columns’); function my_season_columns($columns){ unset($columns[‘posts’]); $columns[‘cpt_count’] = ‘Races’; return $columns; } You then tell WordPress what to fill this … Read more