Questions tagged [taxonomy]

A taxonomy is a generic "category" used to organize posts and custom post types

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

WP Job Manager plugin - Listing only the twelve job categories on frontpage order by jobs they have

i am using wp job manager plugin and i am trying to list on the frontpage only the twelve job categories according to the jobs they having. The job categories having more jobs go first. I managed to ...
1
vote
1answer
39 views

Custom post taxonomies as tax_query terms?

I have these two custom post types called “product” and “reference”. On “references” I have attached a custom taxonomy called “product_reference” which I use to specify which products the references ...
0
votes
0answers
13 views

Add / with post_type_link give me 404

I use post_type_link to change the URL for a custom post type "products". I want the URL to be "www.domain.se/parent-taxonomy/taxonomy/post-name". Using this guide: https://wsidmg.com/change-url-...
0
votes
0answers
16 views

How to replace custom post type with custom taxonmy in permalinks

I have a Url structure of http://domain.com/hospital/hospitalname (here hospital is custom post type and hospitalname is a registered business user) I want to change the Url structure to http://domain....
0
votes
0answers
12 views

Wordpress filter Query custom post type by two taxonomies

I got one custom post(vendor), and two taxonomies(city, discipline). the logic was built under ACF(Advanced Custom Fields) I want to query them by city and discipline this is the structure I struggle ...
0
votes
2answers
16 views

How do i enable categories for my custom post type?

I have a custom pos type created in functions.php and working great - except I need to have categories enabled. I have looked through other answers here, and am still not able to figure it out. In my ...
0
votes
1answer
11 views

How to add a taxonomy type in Menus?

I have a custom taxonomy, "Events". I want to add the object for this taxonomy type as a Menu item (Appearance > Menus). I don't mean I want to add a term of Events. I mean the taxonomy itself. For ...
0
votes
2answers
15 views

Add class to website based on post taxonomy

I want to write a class to the body of all pages posts and custom posts (IE entire site) I am using a front end editor that allows logged in users to edit posts and keep them out of the back-end. I ...
0
votes
0answers
43 views

Filtering multiple categories via the URL

Is it possible to filter multiple categories via a URL? Basically I have two sections to the site, let's call them fruits and vegetables. I have a list of categories which applies to both of these, ...
0
votes
0answers
13 views

Listing Cities based on total user registered

I have this code that lists cities in assending order, I want it that it lists cities based on the total number of listings/users "$total_users = listingo_get_total_users_under_taxanomy($city_name,...
0
votes
0answers
25 views

Cloning product not copying custom taxonomies

I have created a custom taxonomy called locations with a lot of options on it. When I clone a product everything is cloned correctly (categories, attributies...) but not the custom taxonomy , all the ...
0
votes
1answer
22 views

Custom taxonomy returns 404 even with saving permalinks

I'm trying to register a custom posttype and custom post type taxonomy. But when I create a term and click the button "view" to see the custom taxonomy page it returns a 404. I've tried resaving the ...
0
votes
0answers
30 views

Save Taxonomy of Post via custom Taxonomy Select Dropdown

I have a custom post type called "nutrix-recipe". It has a lot of taxonomies, for example "nutrix-category" or "nutrix-tag". In post_edit.php, I removed all taxonomy meta boxes and added select2 ...
0
votes
1answer
69 views

Get all sub-categories of a parent category

How could I get a list of sub-categories (empty included) of a specific parent category (not within a post) by providing the parent category ID or slug? I need 3 levels depth. Example: picture My ...
0
votes
0answers
28 views

Taxonomy template is not reading

I've created a woocommerce shop by using biagiotti theme and I add a taxonomy with the follow code : // create marques taxonomy for the post type "product" function create_marque_taxonomies() { //...
0
votes
0answers
37 views

ACF - Can't get custom post type by taxonomy

Although I've read many other answers with the same question on StackOverflow none of them where able to fix the issue I have. I'm using ACF and have a custom post type called "services". The CPT has ...
0
votes
1answer
24 views

Post not using taxonomy template

I do know that this question has been asked before, but I'm writing because the solutions I have found didn't work. So, I have a lot of posts with 'post_type' = 'post' that are filtered by a category ...
0
votes
0answers
20 views

How best to add Author or Artist to product

What is the best way to set up Authors or Artists to a Product (on a book store) where I can also have pages created for each Author? Author pages would include an image and a description including ...
0
votes
0answers
19 views

Custom Taxonomy “Add New” redirects curious

i created a custom post called nt-recipe. i also added a custom taxonomy nt-category Cause I want to control the position of items in the CPT admin menu, I set show_in_menu to false and added this ...
0
votes
1answer
16 views

Different Templates for Woocommerce Parent and Child Sub Categories

I need a way to have 2 different layouts for Woocommerce prodcut categories. One for categories that contain products and another for categories that show sub-categories. I've been scouring the ...
0
votes
1answer
17 views

Echo text using is_tag

I've been trying to echo some text to all single pages that are part of tag_ID 129 This is the code that I used <?php if ( is_tag( '129' )){ echo '<p> test 2</p>'; } ?> so ...
0
votes
0answers
52 views

Add custom taxonomy to default category taxonomy?

I'm trying to add a custom taxonomy to default category taxonomy but I could not figure out how to. I tried this but failed :/ register_taxonomy( 'oyuncu', 'category', array( '...
0
votes
1answer
18 views

Modify output of wp_dropdown_categories to add term IDs to each option

I've been searching for documentation or examples on how to modify the output of wp_dropdown_categories so I can add the term ID to each option. Is this possible? If not, my only thought would be to ...
1
vote
0answers
53 views

Get related posts of child term of custom post type

I want to show related posts of my child taxonomy term from taxonomy terms of custom post type. CPT: project Taxonomy name: preferences Parent term: 2BHK, 3 BHK Child term of 2 BHK: completed ...
0
votes
0answers
33 views

Filtering posts in category by tag URL

I'm still learning WP, so this might seem pretty obvious to veterans. I've been given admin rights to a WordPress site and told to replicate what my predecessor did with a specific pair of pages. ...
1
vote
0answers
15 views

How to add textarea field to taxonomy (tag)?

How can I add custom field (textarea) to wordpress taxonomy (tag)? add_action('admin_init', 'tag_custom_fields', 1); if( !function_exists('tag_custom_fields') ) { function tag_custom_fields() { ...
0
votes
1answer
44 views

Template taxonomy-{taxonomy}.php doesn't show my posts

I have a simple issue that can’t solve. I have a Custom Post Type called “Hardware” and inside a taxonomy called “hardware_category”. I'm trying to display a list of my custom posts in each term with ...
0
votes
0answers
9 views

How to get value of custom taxonomy filed using the term slug

I have a taxonomy 'topics'. There are multiple fields that I have created using Toolset. I want to get the value of a particular field for that slug. How do I get that. I have used var_dump(get_field('...
1
vote
0answers
18 views

Limit amount of posts made within a custom taxonomy

Is there a way to limit the number of posts that can be created within a custom taxonomy? I have a custom post type called Preferred Agents and a custom taxonomy called Agent Location. I want to be ...
0
votes
0answers
44 views

Same base slug for CPT post and CPT taxonomy terms

Variations of this issue have been posted a few times over the years however after going through all of these I have been unable to find a solution. We need to have the same base slug for CPT post ...
0
votes
1answer
57 views

Rewrite custom post & taxonomy to share same URL path

I have a custom taxonomy (video-category) for a custom post type (video), and I'm trying to rewrite their paths in line with the examples below: Post (Archive): about-us/video-center/category-name ...
0
votes
2answers
30 views

Display related terms from a taxonomy in an entry

I have a function to obtain specific taxonomies in each entry. The problem is, for each entry, it shows all the values that the taxonomy contains. How can I do to show the correct value to each entry? ...
1
vote
1answer
37 views

Want to hide some categories from the categories meta box in the post editor for the two specific user roles

Recently, I am customizing the COLORMag theme in WordPress. I want to make my site as a multi-author website where random people will register and write. But as my theme's homepage shows all the posts ...
0
votes
1answer
26 views

Custom Taxonomy Is Being Pulled into a Page, But It Doesn't Have A Hyperlink

I have a WP_Query class on the home page of a site that pulls in a custom post type, and as part of this I want to show the custom taxonomy (category) for this post type. The solution I currently ...
0
votes
1answer
24 views

I receive taxonomy id

Hello i want to get the value from field but i receive the id code is here: function add_product_column( $columns ) { //add column $columns['new_column'] = __( 'New column', 'woocommerce' ); ...
0
votes
0answers
16 views

Wordpress Portofolio Conditional Templating - functions php

I'm trying to load some code depending on which portfolio category i am , but cant seem to get it quite right... I've read that portfolio categories are called taxonomies, but don't know if thats ...
0
votes
1answer
9 views

What is the use case for sharing a term between multiple taxonomies?

The WP_Term::get_instance() method, used by get_term() and presumably other core API functions, accepts an optional $taxonomy arg that is "only used for disambiguating potentially shared terms." What ...
0
votes
1answer
45 views

Update a list of product to featured if product have meta value (Mysql not wpquery)

Since woo 3 featured product is name and slug of taxonomy 'product_visibility'. I need to update all products with same meta_value contained in list to 'featured'. My products have a meta_key = '...
0
votes
0answers
21 views

How to separate an overgrown blog into sub-blogs – without breaking existing inbound links?

I have a single WP install that has accumulated a mix of content, large subjects of which I want to separate into something resembling their own blogs. Example: Among the pages and posts on myblog....
0
votes
1answer
16 views

how do you pull data from two taxonomies?

I have posts loaded from taxonomy, but I'm trying to get the data of another, that's also attached to the same post. In the code below, the main focus is getting $location_slug. Knowing how to get ...
0
votes
2answers
60 views

List just subcategory and products of active category page in Woocommerce

Working on a category page - taxonomy-product_cat.php - I want to list all the subcategories of that category page, with all its products. I would think it is simple enough but I cant get it to work. ...
0
votes
1answer
21 views

Create custom post type categories

I've created a CPT called 'Projects' in WP using pods. If I now go to the categories sub menu for this CPT I am presented with a long list of categories that were created for the specifically for the ...
0
votes
1answer
38 views

List taxonomy term slugs within shortcode (do_shortcode)

I'd like to list the taxonomy terms within my shortcode. This is how I get the list of terms (separated by commas): <?php $terms = get_the_terms( $post->ID , array( 'shoptype' ) ); ...
0
votes
0answers
19 views

Output taxonomy by picked order

quick question... I have a taxonomy associated with a custom page type. When choosing them in the custom page I want to preserve the order by which item I choose first. How can this be achived? Or ...
0
votes
0answers
24 views

How to make 'show_option_all', that comes from wp_list_categoreis, to work with get_categories or with get_terms?

My problem is that I want to make an ajax category filter, where it shows the categories, but also to have a button "all Posts" so the user can go back to viewing all posts. My current code is using ...
0
votes
1answer
26 views

Custom query for certain post type OR another post type with a certain category

I want to display posts that are either EITHER Post Type A OR Post Type B but ONLY if they are also in CATEGORY 1 Is that at all posible? How do I built my custom query?
0
votes
0answers
24 views

problem : Custom taxonomy template not showing

I make a custom post type and a custom taxonomy for that but the template of my custom taxonomy return error 404 , for example local/mywebsite/people/catea show error 404. function web_people() { ...
0
votes
0answers
16 views

Can selected taxonomies be used dynamically to display information?

I’m creating a business directory site in which users will create a business listing and while creating that listing, select certain amenities they offer. I’ve created several taxonomies to be used ...
0
votes
0answers
9 views

Get name of all term which is duplicate using Mysql

I am coding something to get all duplicate term which has duplicate name using MySql query. The issue I have currently is I am getting the records in a single occurrence I need all data which has same ...
0
votes
1answer
29 views

delete category on plugin deactivation wordpress

I am trying to delete the category dynamically when the plugin is deactivated but it is not deleting But it is adding on activation properly the only problem is deletion of category on deactivation. ...

1
2 3 4 5
35