0

is it possible to apply a custom taxonomy to links? if so how?

i already did this, but it does not seem to work:

$labels = array(
    'name'                       => _x( 'Lessons', 'Taxonomy General Name', 'text_domain' ),
    'singular_name'              => _x( 'Lesson', 'Taxonomy Singular Name', 'text_domain' ),
    'menu_name'                  => __( 'Lesson', 'text_domain' ),
    'all_items'                  => __( 'All Lesson Lessons', 'text_domain' ),
    'parent_item'                => __( '', 'text_domain' ),
    'parent_item_colon'          => __( '', 'text_domain' ),
    'new_item_name'              => __( 'New Lesson', 'text_domain' ),
    'add_new_item'               => __( 'Add new Lesson', 'text_domain' ),
    'edit_item'                  => __( 'Edit Lesson', 'text_domain' ),
    'update_item'                => __( 'Update Lesson', 'text_domain' ),
    'separate_items_with_commas' => __( 'Separate Lessons with commas', 'text_domain' ),
    'search_items'               => __( 'Search Lessons', 'text_domain' ),
    'add_or_remove_items'        => __( 'Add or remove Lessons', 'text_domain' ),
    'choose_from_most_used'      => __( 'Choose from the most used Lessons', 'text_domain' ),
    'not_found'                  => __( 'Not Found', 'text_domain' ),
);
$args = array(
    'labels'                     => $labels,
    'hierarchical'               => true,
    'public'                     => true,
    'show_ui'                    => true,
    'show_admin_column'          => true,
    'has_archive'                => true,
    'show_in_nav_menus'          => true,
    'show_tagcloud'              => true,
);
register_taxonomy( 'lesson', array( 'post','portfolio','link', 'forum' ), $args );

thanks

Marco

1
  • 1
    The correct taxonomy is link_category, not just link. See this post Nov 11, 2014 at 19:16

1 Answer 1

0

The Link Manager is a pseudo post type at best. You can either use the default 'Categories', or go full circle and (1) register a new post type + the custom taxonomy on the new post type or (2) use post formats + the custom taxonomy on posts

Links Manager

Registering a new Post Type

Post Formats

1
  • Thanks! I was hoping for the link to be assimilated to a post-type. Nov 11, 2014 at 19:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.