Home / Archive / YouTube Feeds Pro add Category Support
Duplicate Snippet

Embed Snippet on Your Site

YouTube Feeds Pro add Category Support

This snippet registers a new taxonomy for the custom post type related to the individual video posts created using YouTube Feeds Pro by Smash Balloon. Use it if you need to categorize your video posts.

Code Preview
php
<?php
function sby_videos_taxonomy() {
    register_taxonomy(
        'video_categories',  
        'sby_videos',             
        array(
            'hierarchical' => true,
            'label' => 'Video Categories',
            'query_var' => true,
            'rewrite' => array(
                'slug' => 'video-category',
                'with_front' => false
            )
        )
    );
}
add_action( 'init', 'sby_videos_taxonomy');

Comments

Add a Comment