Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8535797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:31:04+00:00 2026-06-11T10:31:04+00:00

I am only just learning about custom taxonomies for WordPress. How is it possible

  • 0

I am only just learning about custom taxonomies for WordPress. How is it possible to restrict access for my users to use a taxonomy. For instance, I have created a taxonomy named featured and I only want Editors and above roles to be able to add posts to this taxonomy.

How do I set the access level? Either based on user role or capability, both works for me.

Here is the code that I use for my taxonomy:

function add_custom_taxonomies() {
    // Add new "Featured" taxonomy to Posts
    register_taxonomy('featured', 'post', array(
        // Hierarchical taxonomy (like categories)
        'hierarchical' => true,
        // This array of options controls the labels displayed in the WordPress Admin UI
        'labels' => array(
            'name' => _x( 'Featured', 'taxonomy general name' ),
            'singular_name' => _x( 'Featured', 'taxonomy singular name' ),
            'search_items' =>  __( 'Search Featured' ),
            'all_items' => __( 'All Featured' ),
            'parent_item' => __( 'Parent Featured' ),
            'parent_item_colon' => __( 'Parent Featured:' ),
            'edit_item' => __( 'Edit Featured' ),
            'update_item' => __( 'Update Featured' ),
            'add_new_item' => __( 'Add New Featured' ),
            'new_item_name' => __( 'New Featured Name' ),
            'menu_name' => __( 'Featured' ),
        ),
        // Control the slugs used for this taxonomy
        'rewrite' => array(
            'slug' => 'featured', // This controls the base slug that will display before each term
            'with_front' => false, // Don't display the category base before "/locations/"
            'hierarchical' => true // This will allow URL's like "/locations/boston/cambridge/"
        ),
    ));
}
add_action( 'init', 'add_custom_taxonomies', 0 );
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T10:31:05+00:00Added an answer on June 11, 2026 at 10:31 am

    Would it be sufficient to remove the metabox from the Post Edit page? If so, give this a whirl:

    function remove_featured_meta() {
       if (!current_user_can('moderate_comments')){
           remove_meta_box( 'featureddiv', 'post', 'side' );
       }
    }
    
    add_action( 'admin_menu' , 'remove_featured_meta' );
    

    You can fill in the conditional statement with whichever appropriate capability corresponds to the user role to which you’d like to limit access to the taxonomy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just wonder if it is possible to only use CSS but not javascript
I've just started learning about extending the Configuration file structure by creating custom section
Just learning about sql joins and things, and I have a question. Can you
I have a repo setup, and am just learning about how branches work. Right
I'm just learning about custom controls in C# (window forms) I've created the below
I'm just learning about generics and have a question regarding method return values. Say,
Just began learning about algorithms in c++. My book mentions a simple read-only algorithm
I have just started learning basics about Graphics2D class, So far I am able
I'm just learning about F# and plan to use it for my next project.
I have just started learning about socket programming and learned about winsock and achieved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.