Restrict user to terms in a custom taxonomy registered for both posts and users
Restrict user to terms in a custom taxonomy registered for both posts and users
Restrict user to terms in a custom taxonomy registered for both posts and users
Turns out the issue with my category was that it was a custom taxonomy: elseif ( is_tax(‘category’, $private_categories) ) needed to be elseif ( is_tax(‘wzkb_category’, $private_categories) ) Super simple but might send someone down the correct path in future.
I’ve not reviewed your code, just a quick thought: Have you tried Going to Settings => Permalinks and just clicking ‘Save Changes‘? That flushes the rewrite cache.
Custom Taxonomy Not Being Recognized by is_tax()
Your list of products is a list of taxonomy terms. You can get this list with those functions: get_terms($args) — Retrieve the terms in a given taxonomy or list of taxonomies. get_the_terms($post, $taxonomy) — Retrieve the terms of the taxonomy that are attached to the post. Clicking on a Product — is opening a custom … Read more
Fortunately this guy has written a great taxonomy class to solve all of this 🙂 https://en.bainternet.info/wordpress-taxonomies-extra-fields-the-easy-way/
Pre_get_post custom taxonomy combined with custom fields?
create specific taxonomies template for Genres & Year & Author like this : taxonomy-genres.php taxonomy-year.php taxonomy-author.php
I’m guessing you want to display that information on a single post or a post type? is_tax() conditional tag is used to determine if the archive page of a particular taxonomy/term is displayed. (documented in codex) What you’re probably looking for is has_term() function (documented in codex). So in your case the full condition would … Read more
In your PHP file… $context[‘topicTax’] = Timber::get_terms(‘topic’); Timber::render(‘my-template.twig’, $context); … is the correct structure. The problem is that WP’s get_terms returns “dumb” objects that don’t have methods for retrieving ACF info. If you still run into issues, verify that those objects are Timber\Terms rather than WP_Term Also, if you’re looking for the more active forum: … Read more