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.

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

Change list of term by choice of custom post (logical condition on form)

I made a script that lists me in the posts that are of a type related to another type of content. This I do on a form. What I want to do is: If I choose the type of post (custom1 = formation) in a ...
0
votes
1answer
35 views

Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?

So here's an odd one. I have custom taxonomies that show on the admin menu of both post types they're associated with, but only one of the post types shows them in its edit menu. (Over on the side of ...
3
votes
1answer
1k views

Ajax post filter by taxonomy

I want to make a filter width more than one tanonomy width ajax and jquery, The demo i want to code is: http://gycweb.org/resources/ I have tried to code with this demo: http://dinhkk.com/demo/...
0
votes
1answer
46 views

Get terms of a post but only if they're also the child of a specific term

I have the below code successfully running on my custom post type archive pages. The only issue I have is that I want the list of 'book_cat' taxonomy terms for that post but ONLY if they're also ...
0
votes
1answer
23 views

Targeting custom post type via functions.php doesn't work

I have a custom post type, books, set up and a custom taxonomy, book_cat, to act as categories for these posts. I've added the below code to functions.php to sort posts on my custom taxonomy archive ...
1
vote
1answer
1k views

Get custom taxonomy for visual composer shortcode but not working?

I created a shortcode for visual composer to get terms of a custom taxonomy. But when I get them (for a category dropdown on visual composer's backend editor) it's not working. My code: $args1= ...
0
votes
2answers
581 views

Filter “get_terms” query

I'm currently getting the data from a custom taxonomy using this: $terms = get_terms(array( 'taxonomy' => 'my_custom_taxonomy_name', 'hide_empty' => true )); Now, this returns a lot of ...
0
votes
1answer
35 views

Add taxonomy column with meta field (ACF) content

Trying to populate the column with meta field, this way (ACF): add_filter('manage_artist_custom_column', function ($content,$column_name,$term_id){ $term= get_term($term_id, 'artist'); switch (...
0
votes
0answers
40 views

Rewrite Search URL Permalink For CPT Custom Taxonomies

My site uses a CPT with custom taxonomies and shows this URL for searches : https://example.com/?s=&post_type=listing&location=bridgeport&sale_type=for-sale&property_type=office But ...
0
votes
0answers
19 views

List hierarchy of taxonomies related to posts from current query

I have a custom post type that has two taxonomies related to it. Think a Post of "Equipment" and taxonomies of "Manufacturer" and "region". Region is a hierarchy and a ...
5
votes
1answer
4k views

Ordering posts by custom taxonomy in admin area

EDIT @kaiser - this question is slightly different to the answer you posted in that I am talking about sorting by clicking the column title rather than adding a dropdown to filter by taxonomy term (...
0
votes
1answer
3k views

How to list custom post types on a custom post type page?

I would like to know why my custom post type pages do not accept paged pages? On a normal page I can list custom post types without problems, but on a custom post type page, it seems impossible. I ...
1
vote
0answers
22 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 ...
0
votes
1answer
970 views

Show portfolio category slug in url ( if exist)

I'm trying to achieve a two level portfolio structure, and it works fine in the breadcrumbs but not in the URL. The idea is to show the portfolio slug (destinations) followed by the portfolio category ...
0
votes
0answers
6 views

Issue with permalink for CPT and Custom Taxonomy

I'm working on a website with a number of custom post types and custom taxonomies. I've setup a CPT named service with a custom taxonomy named servicecategory. The URL for my service posts look like ...
1
vote
1answer
937 views

Term and sub term from custom post type query

I have created a custom post type and taxonomy for a goods catalogue for a hire website. This works fine. I am trying to generate a report that lists all items and their category and sub category. I ...
0
votes
2answers
954 views

Show single Child Category on Custom Post

Am hoping someone can help me pull out a single custom category name and show it on my custom post page. I've created a new custom post type 'Itinerary' as well as some new custom categories (terms): ...
0
votes
1answer
808 views

How to display only taxonomies of custom post type in a page?

I have created recipe as a custom post and types as a taxonomy. In that taxonomy I have created vegetables and fruits as fields and I have 5 posts in each fields, but I need to display only vegetables ...
0
votes
3answers
2k views

link posts to custom post type

I have a custom post type 'books' which I store different custom fields of information about books. I want to use posts and link the posts I write (in categories such as news, or offers) to the books....
0
votes
1answer
18 views

'wp' action hook not firing in admin and login?

I need to register an action via add_action('wp', function(){...}); The action works in frontend, but in backend and login page it doesn't work. It seems as if 'wp' hook doesn't exist for ...
1
vote
2answers
1k views

Custom post type / taxonomy rewrite archive page 2 gives 404

I've followed the code based off this and everything is working perfectly -How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-...
0
votes
0answers
8 views

How to allow users to add a custom item to a taxonomy other than an admin in a custom post type?

The first picture is a picture of a taxonomy in a custom post type logged in with the role of an admin. The second picture is a picture of a taxonomy shown in a custom post type logged in as another ...
0
votes
1answer
16 views

How to add a shortcode function that returns the taxonomy slug of the actual post within the loop

Circumstances: I have a CPT called "designs" and a taxonomy related to it, called "project_category" so that I can assign a category to each design. I'm building the template for ...
0
votes
1answer
1k views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
0
votes
1answer
10 views

get term id from term name

Hi i am trying to get term id from term name (title ). <?php if ($_SERVER["REQUEST_METHOD"] == "GET") { // collect value of input field $nameb = $_GET['fname2'...
0
votes
1answer
866 views

tax_query showing no results

I'm creating a music database site with two custom post types: tracks and albums. I've linked the tracks to their respective albums with a custom taxonomy for the album's slug. On each album page, I'm ...
1
vote
2answers
905 views

Display related products based on 2 specific product attributes values in WooCommerce

I am looking for solution to display related product by multiple product attributes. I've tried "Display Related products for a specific product attribute value in single product pages " StackOverFlow ...
2
votes
1answer
22 views

Auto add taxonomy if post has category

First off this is my first time posting on here. I can usually do research and put together code that I need based off of other's responses, but I'm stumped on this one. I've been at this for almost a ...
0
votes
0answers
16 views

Custom widget for category filter with custom post types

I'm trying to create a widget for my sidebar that allows readers to filter for both the regular blog categories and for the categories of my custom post types. What I have come up with so far gives me ...
0
votes
0answers
10 views

Custom search results page template

My custom search form searches for posts in two custom post types by selected taxonomy. Search results are displayed on blogposts page (index.php template) and I need to display results on custom page....
0
votes
0answers
8 views

Associate custom field with custom taxonomy with shortcode in backend

I am trying to associate a custom field to a custom taxonomy booked_custom_calendar. Custom field here is [notifications_user_id]. All this will be executed using a shortcode. When user clicks on ...
0
votes
1answer
634 views

Displaying subcategories and then posts in taxonomy template

I have a custom post type 'downloads' which i have a have a custom template set up to get terms of to begin with. Im now trying to set up my taxonomy template so that it displays sub-categories if ...
1
vote
1answer
2k views

Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?

I have a custom post type with a custom taxonomy (to show some "best practice" examples on my website). On the single-post-page (single-bestpractice.php) I wanted to show all the terms (categories) ...
3
votes
1answer
617 views

Bulk 301 redirect for custom post type

I've amended the URLs for my custom post type from: url.com/jobs/job-name to url.com/jobs/job-location/job-name Problem is, because this isn't a standard rewrite wordpress doesn't do the 301 ...
0
votes
1answer
1k views

Remove custom post type slug but keep related category taxonomy permalink

struggling as well with custom url rewriting for custom post type taxonomies. Here is my requirement: domain/mycpt_category/postname/ It's well documented here and in several SE threads removing ...
1
vote
1answer
1k views

Some custom taxonomy child terms not showing in admin. Caching problem?

I have a problem with some custom taxonomy terms. I am using "Types" plugin for creating custom post types and custom taxonomies. I successfully created my postype and hierarchical taxonomy and ...
1
vote
1answer
20 views

Fetch taxonomies by custom post type id array

I want to find all the taxonomies that match an array of CPT id's. I have a taxonomy called location and I want to find all the locations where they have posts that are equal to my array of post id's ...
5
votes
1answer
3k views

I want to load post content by categories using Ajax

I have question. I would like to load post content, custom post, depends on category. So first of all I would like to have drop down menu which will list all my categories then once user will select ...
0
votes
2answers
2k views

How to display Related Posts based on number of taxonomy terms matched

I have a custom post-type 'News' which has multiple custom taxonomies 'news-category', 'news-tags'. Each post contains between 4-8 'news-tags' and 1 'news-category'. For my current post, I'd like to ...
0
votes
1answer
532 views

The most recent post of custom taxonomy

I am trying to get the most recent post of the taxonomy term 'featured-layout' within the taxonomy 'value_category'. The following code is returning all the 'featured-layouts' when I'm only wanting to ...
0
votes
1answer
13 views

Get dropdown child categories from parent category of custom post type

Finally i cant get subcategories from a custom post type category and everything works fine. The problem is when i want get the same but with a dropdown for responsive. Is possible? i need hide empty ...
0
votes
1answer
2k views

Add active class to foundation 6 tabs while looping categories

I have a custom post type (bulletins) that I'm putting into Foundation 6.4.3's tabs and accordions. The taxonomies are the tab headings. The individual custom post type content is the accordions. My ...
0
votes
1answer
14 views

Search CPT by tag ids

I need to search custom post type by tagids. I have created a post type that is "gampu". In this post type i have register 5 tags taxonomy like 'fitting', 'adapter', 'type', 'volume' and '...
0
votes
1answer
686 views

Create a Hierarchical List of Custom Taxonomies AND Posts

I'd like to create a 3-tier hierarchical list of terms within a custom taxonomy, which includes up to 10 posts within each of the bottom-level term(s) only. e.g. Custom Taxonomy - Parent Term 1 -- ...
0
votes
0answers
21 views

Warning: Undefined variable $post in C:\xampp\htdocs\… after PHP upgrade

I use localhost for testing and debugging sites, before making changes to the live site. Because MySQL failed in XAMPP, I had to install XAMPP from scratch. I'm now using PHP version 8.0.3. ...
0
votes
2answers
23 views

WP custom posts: filter results to custom taxonomy tag that corresponds to user meta field

I need some guidance on making a wordpress posts query responsive to user meta data, and whether it’s possible to do what I want within the query itself, or if further work is needed in the database ...
0
votes
1answer
20 views

Archive page for taxonomy terms

How can I create a archive over terms from a custom taxonomy like there is for custom post types? domain.com/taxonomy is empty/404, while domain.com/cpt shows all posts for that CPT. I know I could ...
0
votes
0answers
10 views

Taxonomy page not working

I have a custom post type called topics, with two custom taxonomies: topicscat and tagscat. The taxonomy page of tagscat is returning 404 error. I guess Im not registering it right. Here is my code. &...
2
votes
2answers
2k views

wp_query to display custom taxonomy terms

I have a custom post type named 'tours' and custom taxonomy named 'tourtypes' so i can categorize it into terms like 'cultural tour', 'sports tour' etc. I'm not the original author of this theme and ...
1
vote
1answer
21 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
2 3 4 5
85