WordPress.org

Forums

Restrict Categories
[resolved] Custom Taxonomy (3 posts)

  1. RobinWebber
    Member
    Posted 1 year ago #

    Hi there,

    Great plugin! I'm trying to get it to work with a custom taxonomy. I think I've changed most of the 'category' settings inside the plugin, but I can't figure out how to change this part:

    wp_list_categories(
    	array(
    	'admin'          => $id,
    	'selected_cats'  => $selected,
    	'options_name'   => $options_name,
    	'hide_empty'     => 0,
    	'title_li'       => '',
    	'disabled'       => ( 'all' == $current_tab ? false : true ),
    	'walker'         => $walker
    	)
    );
    
    $disable_checkbox = ( 'all' == $current_tab ) ? '' : 'disabled="disabled"';

    The wp_list_categories function is not working for custom taxonomies, so I would have to use something like get_terms.

    Maybe someone already figured this out? Thanks for the help!

    https://wordpress.org/plugins/restrict-categories/

  2. RobinWebber
    Member
    Posted 1 year ago #

    Ok my mistake! It is possible to user wp_list_categories with a custom taxonomy.

    I got the lists working on the options-general.php?page=restrict-categories page in the admin, but if I selected all possible terms for the Administrator, the terms aren't showing up in the metabox on the post edit / add new screen.

    Is there something I'm missing?

  3. physalis
    Member
    Posted 11 months ago #

    Hey @Robin, did you find a solution to it? I really badly need a way to restrict taxonomy terms instead of categories for users to see and edit in the backend ;).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Restrict Categories
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.