Questions tagged [custom-taxonomy]

Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

1,389 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
2k views

Custom Post Type and Custom Taxonomy Permalinks

I'm currently working with a client's Wordpress blog that has a permalink structure set in the admin settings as "/speaks/%postname%/". This is so that all actual blog posts (post_type=>posts) have ...
2
votes
1answer
56 views

Get terms from posts submitted within a certain time

I am running a query which pulls out the most popular taxonomy terms (named "cause") from a custom post type (named "reasons") and I am ordering them by most popular. However, I need to limit the ...
2
votes
0answers
897 views

Can I change the slug of my archive page on a Custom post type?

I have a CPT with a slug that is the same of a page. This has been done on purpose as I hope I was able to control the slug of my archive page to be something like http://www.test.me/page http://www....
2
votes
2answers
163 views

How to list all record from one custom taxonomy start with only one letter i.e A

I want to list all records in one custom taxonomy start with only A or B. Below code is to list all record with all letters. Here is the code to list all record with one custom taxonomy with all ...
2
votes
0answers
1k views

Custom Posts Hierarchy? (State/City/Restaurant)

Question: What is the best way to create a hierarchy structure (also called parent/child relationships) between custom post types? For example, we currently have 3 post types: States, Cities, and ...
2
votes
1answer
283 views

How to sync tags between posts that are linked through Posts 2 Posts?

I am faced with a thorny problem and can't seem to find the solution in the wealth of community knowledge on the web. I have two custom posts types "Person" and "Activities". I use posts 2 posts (...
2
votes
0answers
2k views

Custom Post Type with two hierarchical Custom Taxonomies: strategy to generate best permalink structure

this is my situation: I have a Custom Post Type named struttura (like accommodation): function custom_post_struttura() { $labels = array( 'name' => _x( 'Strutture', '...
2
votes
0answers
493 views

Move terms from one taxonomy to another keeping the hierarchy

I am creating a custom taxonomy for the first time. I am trying to add a Location taxonomy. What I am actually trying to do is use existing categories to make them into locations. I went into the ...
2
votes
1answer
293 views

Automatically populate a hierarchical taxonomy from a custom field

I've got a vexing how-to that I've not found any help on. I have a custom post type that has a custom field with a date in it (format: yyyy-mm-dd-t). When a post is published or edited, I would like ...
2
votes
1answer
143 views

Add nonexisting pages to navigation

I want to include categories which are listed in a non-native WordPress table to display within the "normal" wp page navigation (the table comes from WP-Filebase and is called ->prefix .wpfb_cats) ...
2
votes
1answer
326 views

How to create custom taxonomy URLs without taxonomy name?

I have a website that lists businesses in different cities (this is a niche site, so all businesses have the same "classification"). For starters I created a CPT for locations and a taxonomy called "...
2
votes
1answer
239 views

How to specify URLS for custom posts & taxonomies

I've read a few posts about this, but can't find a clear answer :( I have a custom post type called {ondemand} Within the custom post, I have three taxonomies {speakers} and {categories} and {season} ...
2
votes
1answer
295 views

Custom post types and permalinks

I have a custom post type called Content, that has a capability type of 'page' and is set to 'hierarchical' => true. I have two pages with the same name "Children", but they have ...
2
votes
1answer
83 views

How can I get WP to build a feed based on multiple taxonomy terms

Currently, the best way to get a feed generated for a single taxonomy term is by letting wordpress generate the content automatically: example.com/wordpress/feed?tax_slug=term_slug However, is there ...
2
votes
0answers
318 views

Display Terms for all posts in Current Archive or Query

I am using the following code to create a list of linked terms belonging to a taxonomy. <?php $taxonomy = 'taxonomy_name'; $queried_term = get_query_var($taxonomy); $terms = get_terms($taxonomy, '...
2
votes
1answer
295 views

How can I add a meta-box to the posts editor containing all items of a custom taxonomy as checkbox?

I have a custom hierarchical taxonomy containing only two levels of items. First Level the title, second level items of the taxonomy. Is it possible to add a "meta box" to the posts editor of ...
2
votes
1answer
125 views

Custom Post Type vs. User Page

I'm creating a multisite network for authors and readers and I want each blog author to create a user profile. Ideally I would do this through a customized user admin area with a bunch of added ...
2
votes
1answer
2k views

How do I sort posts by custom taxonomy?

I am trying to sort posts by custom taxonomy. I have a custom post type which is course-cpt and I have created custom taxonomies within it, I need to sort the courses by course-level (which is the ...
2
votes
2answers
2k views

How to add taxonomy to Users menu in admin?

I want to create a taxonomy that is related to the users, therefore I'd like to show the taxonomy under "Users" menu within wordpress admin. In codex there's a mention that you can attach taxonomy to "...
2
votes
1answer
810 views

Sharing a custom taxonomy with Multiple custom post types

I have created a Custom Taxonomy (Softwares) and shared it with my 3 Custom Post Types (Casinos, Bonuses, Slots) everything was going well but when I created a term (netent) in Softwares(CT) for ...
1
vote
0answers
24 views

Use custom post type taxonomy between cpt slug and name

I'm building a site for a car dealership and I've created a CPT: Cars and a Custom Taxonomy: Brand Each car has one brand (Obviously), but I want to display them like this: dealership.com/cars/%brand%/...
1
vote
0answers
13 views

Custom permalinks with hierarchical taxonomy - getting PHP warning

I have a site where a CPT needs to have permalink structure with custom taxonomies (parent and child). Following this solution https://wordpress.stackexchange.com/a/75172/210080 I got custom ...
1
vote
0answers
32 views

Custom post type url with category

I register a custom post type, called product and also category called cat_product. now I want to set category name in slug for each post, current is: 'slug' => 'product', 'with_front' => false )...
1
vote
0answers
33 views

Custom post type paging return home page

I am having problem with Custom post type paging. Clicking on 2nd page of paging through back to home page. Permalinks flush/refreshed and i am using simple code to show custom post. following is my ...
1
vote
0answers
14 views

Change the permalink URL to include a taxonomy term

I'm brining 3 wordpress sites into one but our existing sites have good brand recognition in our field. So we have the main site which is sitemain.com and all articles that were there have been ...
1
vote
0answers
30 views

Creating a custom "Region switch" to filter posts query and save settings throughout session

I have one WordPress website that I want to make a "regional version" of simply by "filtering" which posts are queried while also using a "custom homepage" whenever a &...
1
vote
0answers
94 views

Landing in 404 Page on Navigating to Custom Taxonomy Archive

Can you please take a look at this post and let me know how I can navigate to Taxonomy URL properly? Having a CPT called movie and a Taxonomy called genre how I can navigate into archive of taxonomy....
1
vote
0answers
39 views

Custom Taxonomy terms aren't getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?

I am using Woocommerce, Elementor, ACF Custom Fields and CPT for Custom Post types. I have a custom taxonomy called 'biographies' which has some associated custom fields (first name, last name, birth ...
1
vote
1answer
55 views

Custom Taxonomy in REST API

I have two custom taxonomies that I use for my posts. I am trying to retrieve the names from only one of them. In REST API V2, I do the following: https://example.com/wp-json/wp/v2/posts/14340/?_embed=...
1
vote
1answer
17 views

Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?

I currently have a Portfolio custom page in Wordpress, so far work as i want, but i have one problem. The problem is when i click one of the button slug then the body/output is not work like i want, ...
1
vote
0answers
22 views

How to limit the number of users who can be added to a user custom taxonomy?

I have created a user custom taxonomy called institutions and when an administrator/NationalCouncil role is creating a user account, he or she should be able to allocate that user to one institution. ...
1
vote
0answers
34 views

How do I get WordPress URL rewrites into Sitemap?

Consider the two following custom post types: Museums Bakeries With one shared taxonomy: Region I'm using rewrite rules to improve the URL structure, so I can serve pages to visitors such as: ...
1
vote
0answers
23 views

How do I move/order posts with a tag to the end?

Let's talk about the situation first. I have a query for finalists, some of which has a tag 'Special Mention'. I need to move all posts with the tag to the end of loop. e.g. I have 13 posts, 3 of ...
1
vote
0answers
17 views

Adding custom post category slug in permalink causes 404 error for pages and posts

I have added a custom post type, I want to add the custom post category in its permalink instead of the static base. For example for the custom posts I want the following permalink structure: mysite....
1
vote
0answers
22 views

Add custom image size for custom post type or taxonomy

I am trying to create specific image sizes for specific post types, taxonomies, or pages. I have done it for post types and pages but I haven't for the taxonomies. Do you have any ideas about how to ...
1
vote
0answers
13 views

Get taxonomy values based on wp_query results

We are building an extension for displaying vacancies. On the overview page of the vacancies we display filters (taxonomies) which are used for filtering the results. We do this by adding a tax_query ...
1
vote
0answers
59 views

What is faster: custom taxonomy or serialized post-meta for db retrieval? (over 60,000 posts)

I have a search plugin that can search serialized metadata as well as categories (for multi-checkbox). Is there any advantage to using serialized post metadata instead of creating a custom taxonomy ...
1
vote
0answers
14 views

Display post as term id

I have one problem, i added taxonomy for Student list, via function do url rewrite: function ex_rewrite( $wp_rewrite ) { $feed_rules = array( '(.+)' => 'index.php?student='. $...
1
vote
0answers
16 views

Need Output Custom Taxonomy from Custom Post Type

I have CPT called news and Custom Taxonomy called news_category. Below code is outputing the all category from Post. What i need is the output showing news_category from News post type, so later i can ...
1
vote
0answers
42 views

Wordpress sort search results by custom order

I want to search "sandwich" I have pages as "sandwich", sandwich-toast, sandwich-three-layer, sandwich-simple posts as "sandwich-recipe", "sandwich-maker-links",...
1
vote
0answers
25 views

How to filter wp_list_categories output with some custom post type meta query?

The main point, why i want to do this, ..is to be able to filter these term listings conditionally, such as: if the CPT that is connected with this taxonomy has some meta fields that are empty or have ...
1
vote
0answers
12 views

Manipulate WP Query using a custom post type and multiple tax_query taxonomies

I'm using the template_redirect action to hook into my archive page before and after the query using $_GET params for 2 different taxonomies. One for GAME and another for MODES. The query works ...
1
vote
0answers
17 views

Custom Post Type - No Results Found

I've recently taken over management of a page that uses a custom post type. The owners of the page developed an iOS app that is using information pulled from the site via the REST API, so I added some ...
1
vote
0answers
19 views

Return the latest post from a custom Taxonomy and Post Type

CPT called: updates Custom Taxonomy called: systems What I was trying to do was loop through all my posts in a CPT and display the '1' latest post from each of my 'I think they're called Terms' (it's ...
1
vote
1answer
55 views

Cannot add category or custom taxonomy from admin. WordPress site is hosted in Windows 16 server via IIS. No XAMPP or WAMP

I am facing a strange issue and have no clue whatsoever. My WordPress site is running a custom theme and hosted on a Windows PC via IIS (no XAMPP or WAMP). I can save Post, Custom Post Type, also can ...
1
vote
0answers
38 views

404 error when navigating to a taxonomy page with Cyrillic, what's wrong?

I am using a custom post type and rewrite rule for nested taxonomies. My permalink structure: site.ru / catalog / term-1 / term-2 / post_name If my taxonomies are in Cyrillic: site.ru / catalog / term-...
1
vote
0answers
36 views

Custom taxonomy rewrite give pagination 404

I have a Custom taxonomy with this rewrite: 'rewrite' => array( 'slug' => '/', 'with_front' => false), So every term will look like this: https://example.com/term/ the problem with the ...
1
vote
0answers
34 views

Displaying CPT and custom taxonomy side by side in Bootstrap 4 component

I'm trying to reproduce a bootstrap navigation component inside a page that display sub category and associated posts to those sub-categories like this: Taxonomy term 1 taxonomy sub-term 1 Post 1 ...
1
vote
0answers
134 views

Use Custom Post Type archive page for the taxonomies term archive page

In my wordpress theme I created a new custom post type 'books' with 2 taxonomies ('series', 'genres'). when I visit the archive of the cpt 'books' (site.com/books), I list all the books. I added a ...
1
vote
1answer
64 views

$_FILES empty on created_{taxonomy} and create_{taxonomy} yet is is not on edit_{taxonomy}

been struggling with a bug. On created_{taxonomy} hook yet in edited_{taxonomy} hook works and upload the expected file with no issues. As per the following code I added custom field type along with ...

1
2
3 4 5
28