How about something like if( in_array( $current_tax, get_user_meta( $user, 'legal_taxonomies', true ) ) )
You can get the current taxonomy information using get_term_by()
. This operates on the assumption that you’re storing the available taxonomies as an array, but is easily changed for any storage method.
Related Posts:
- Taxonomies, restrict editing and creation of terms?
- WordPress User Taxonomy Saved Values
- Store members in custom taxonomy or native user?
- How to get taxonomy term of the current page and populate queries in the template
- Custom taxonomy list page?
- What is wp_insert_term “alias_of” arg for?
- wp_set_object_terms() — prevent overwrite?
- List Hierarchical Term List with Count with Related Term
- Is there a way to set singular/plural labels for taxonomy term names?
- List taxonomy terms as links
- Custom taxonomy on users with UI
- Get_term_by only returns one item from array
- Can we have same term slug in different taxonomies?
- Add additional data to a specific taxonomy term when used in a post
- How to have “the most used tags” taxonomy always expanded?
- Get parent and first child taxonomy terms?
- Get wordpress taxonomy archive and sort by year
- Search for tags
- What hooks/filters are there to alter selected terms on post save?
- Filter blog archive by category in URL
- tax_query: What to pass when I want to have all terms?
- Custom Roll/Custom Post Type – Can’t Select Categories
- Trying to list terms of a custom taxonomy using get_categories
- Add a term to an attachment submitted from front end
- Get and loop posts with all taxonomy terms
- Unable to delete a Category and Tag that share same slug
- what tables uses wp_get_post_terms
- Show list of custom taxonomies when another taxonomy is selected
- List a current posts’ taxonomy terms in a widget in WordPress
- Share taxonomy between user and posts?
- Should I be using custom post types for this or terms and taxonomies?
- How can i list the categories of a post type, the taxonomy
- Custom WP Query: force entry for some taxonomy and have others optional
- Set post terms on post publish
- How to display terms from a custom taxonomy in a hierarchy AND with custom html markup?
- How can I find the taxonomy in edited_{taxonomy}?
- extend HierarchicalTermSelector function with custom renderTerms
- Searching in wordpress using wp_term_taxonomy table
- How to get the top level parent term Advanced Custom Field values in the child terms
- Allow a Taxonomy Term to be Used Only Once Across All Posts
- Enable users to change change and add taxonomies of posts
- Pulling Data from CSV vs. pulling data from database
- Count Published & Draft Posts Associated With Each Term
- “AND” relation in custom taxonomies
- Problem with Query on Taxonomy
- List posts in a category grouped by other categories?
- the_terms characters not limiting
- Hierarchical list of custom taxonomy terms
- Categorize wordpress tags
- How can i count post from my post type taxonomy
- get_term_by seems to be failing
- Blogroll links sorted by category in a table
- How to update a taxonomy term for a custom post type with auto incrementing number
- How to relate a user object to taxonomy term?
- Filtering elements by taxonomy slug
- Taxonomy vs Post Status
- Get terms in hierarchical taxonomy
- Declaring arguments for taxonomy
- Related terms – Terms that feature in post of current term
- Replacing a placeholder term with a session variable value in taxonomy filter
- Loop problem – Taxonomy
- Select query with two and two related taxonomies
- How to relate to 2 taxonomy with category
- WP Search using taxonomy terms
- Customize menu link for taxonomy in WP menu
- Is possible hide hierarchical select dropdown created by jetsmartfilters? (only visual issue)
- How do I converge taxonomy category permalinks into one?
- Taxonomy terms are not checked when edit custom post
- Url leading to archive page, no matter what
- Checking if a product ID has taxonomy term attached not working with has_term
- Can I create a tax query to return posts that match two slugs from same taxonomy
- Taxonomy.php inheriting first post
- Display related terms from a taxonomy in an entry
- I want to get term by term_name without taxonomy
- Add specific content to a taxonomy results page
- Set the limit of taxonomy per page
- What is this Query? and why its taking too much time? Any way to optimize it?
- taxonomy terms, inverted
- Same page for startpage and archive?
- How to use url formatter with integer
- How to share terms between two taxonomies?
- Taxonomy Rewrite Problem
- Taxonomy terms can’t find posts from archive.php or taxonomy.php
- how to print post tags [duplicate]
- Filtering posts by taxonomy and meta_value
- What to do with shared terms splitting in WordPress 4.2?
- How to get a query odered by N of matching taxonomies?
- Front end login and page restriction
- GET Taxonomy ID
- Hiding an Advanced Custom Field based on Taxonomy Field selection
- Non-Recursive get_term_children()
- How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
- Delete Term via edit-tags.php
- multiple taxonomies in wp_list_categories’ $args
- Description of a sub-taxonomy
- Order taxonomy terms by the frequency of use in the last 30 days
- I need to add new menu item inside the custom post admin menu
- How to orderby Taxonomy Term in a WP Query
- Custom Titles for Multiple Tag Taxonomy Page
- Add new taxonomy in WP without generate any url