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

learn more… | top users | synonyms

0
votes
0answers
10 views

Get posts of a custom post type from category from taxonomy?

The theme I'm working with has a custom post type, "portfolio", inside a custom taxonomy, "portfoliocat" (post type and taxonomy definitions here). It is working ok: in the backup menu I can see the "...
0
votes
0answers
8 views

How i can get custom post id using custom taxonomy id?

<?php $pcats = get_terms('pcat'); //print_r($pcat); // echo $pcat = get_the_ID(); exit; foreach ($pcats as $pcat){ echo $pcat->term_id; ...
3
votes
0answers
30 views

How to find objects by terms

I am struggling with a search filtering. Firstly, my script is searching for users using natural search SQL. The query returns ids of users. Now I would like to filter them by terms which are assigned ...
0
votes
0answers
24 views

Implementing custom post type categories / taxonomy? (theme building)

I'm building my own theme for a small business website. This website has a navbar on top, with a dropdown under "Projects", listing several categories. As of now, I have all of these categories listed ...
-1
votes
0answers
23 views

What is the one-query (or the fastest) way to get posts and their terms (more taxonomies)?

Now this might seem like a similar question One query to get posts and their taxonomy terms but it is just similar and does not have proper answer. Goal: I need to get limited number of posts and ...
-3
votes
1answer
17 views

How to create a custom widget in dashboard that shows stats for custom post type

I have a custom post type called Locations. I want to create a widget in the dashboard that shows number of posts in that post type, post taxonomy and number of item in each taxonomy. Any ideas?
0
votes
1answer
37 views

How to Manage and link certain custom taxonomy?

I'm creating some kind of soccer dedicated website.Assuming we created 4 different taxonomies: Teams, Players, Tournaments, Managers. Team includes two different types: National Team Club ...
0
votes
0answers
8 views

Create a post on registration with title include user first name

I use this code for create a post (-type) on user registeration: function create_new_user_posts($user_id){ $userinfo = get_userdata($user_id); if (!$user_id>0) return; $my_bio_post = ...
3
votes
1answer
46 views

Save Filter for Taxonomies

I want to get rid of undesired HTML, mostly being published by my editors when copying text from other sources, like other pages or from Word Therefore I use add_filter( 'content_save_pre' , '...
0
votes
1answer
20 views

Get pages only with a specific taxonomy

I added a custom taxonomy called 'post_tag' to the pages, and I am trying to make a query that gets only the pages that have a specific tag set. I already tried in several different ways, even using ...
0
votes
0answers
19 views

Order posts by term in alphabetical order

I know it's possible to order by terms, but having migrated a huge amount of data from a different CMS, I'm left with a list of brands that are taxonomy terms. I'm using ACF to present the terms as a ...
2
votes
1answer
26 views

Is there a filter hook that I can use to change how taxonomy term names are displayed?

I need to hide a custom taxonomy's terms' names on the frontend while preserving them on the backend. Instead of the terms' names I need to display pseudonyms. I can't find a single filter hook to do ...
0
votes
0answers
23 views

Help to fix custom post rewrite + taxonomy. Simple pages show 404

I'm getting 404 for each page. I want to have structure and pages like: url/page-sample url/taxonomy url/taxonomy/custom-post Example of structure (just trying to explain): url/about-us-page url/...
0
votes
0answers
14 views

Taxonomy archive: Query all posts first, and then group by taxonomy term?

I have two taxonomies: 'season' and 'style'. On my 'season' archive template, the following query groups all the 'season' posts by their 'style' term. This works great. But the problem is that I ...
0
votes
1answer
27 views

Permalinks for a custom post type - with a page template (custom query) and taxonomy archive

I'm having trouble getting my permalinks working with a specific custom post type setup. Here's the code for the custom post type: function jc_attactions() { $labels = array( 'name' => '...
0
votes
0answers
38 views

WP Job Manager - display search results from custom search form in taxonomy-job_listing_category page

i want to ask something about wp-job-manager plugin. i have been already created a taxonomy_job_listing_categoy template to list all jobs from a certain job category. You can see an example here: http:...
0
votes
0answers
33 views

WP Query with sticky posts and tax_query

I have this query; $posts = new WP_Query(array( 'post_type' => 'post', 'posts_per_page' => 5, )); Which correctly places sticky posts at the beginning. However,...
0
votes
0answers
15 views

Display posts in a custom taxonomy, grouped by a different taxonomy

The setup: I have a custom post type called products. I have a custom taxonomy called styles with terms modern, classic, rustic. I have another taxonomy called seasons with terms fall, winter, ...
1
vote
1answer
50 views

Filter blog archive by category in URL

I've created a fairly basic form that allows users to filter post type archives by their taxonomies. On custom post types this is super simple to do by simply setting ?taxonomy_name=term_slug in the ...
-2
votes
0answers
29 views

Custom post type use defaut toxonomy blog category and post_tag

I register a new custom post type. I decided to use default category and post_tag of blog for it. 'taxonomies' => array( 'category', 'post_tag' ), However, I don't know how to get ...
-2
votes
1answer
61 views

Get posts that matches specific terms of multiple custom taxonomies

I'm working on a page that show a lot of products. My structure is Product (custom post type) -->Brand (custom taxonomy) ------>Brand A (custom term) ------>Brand B (custom term) -->Department (...
1
vote
1answer
30 views

Attaching taxonomy data to taxonomy with wp_insert_post

By WP User Frontend I create a registeration form with some checkboxes, and use wp_insert_post and update_user_meta for create a new post (post type pavilion) on user registration.I want when checked ...
1
vote
1answer
35 views

Return Taxonomy/Term Information with Posts (WP_Query/get_posts)

Is it possible to return taxonomy/term information for posts along with the posts themselves when querying with get_posts? I have around 150 items I am querying so I don't want to loop and pull each ...
0
votes
1answer
29 views

wp_get_post_terms on custom post type with custom taxonomies returning an empty array

I am trying to get the taxonomy values associated with my custom post types. I have a function which fetches a post ($object)'s taxonomies, then cycles through the taxonomies and gets the values for ...
1
vote
1answer
33 views

How to get post's current parent term ID?

How do you get the ID of the parent term of the current child term assigned to a post. For a custom taxonomy? Custom taxonomy: "location" Countries Japan USA Mexico Cities New York Austin ...
0
votes
0answers
9 views

Display nested taxonomies with current class

I have a Wordpress site with a Products custom post type (I'm not using Woocommerce as it is not an ecommerce site). The custom post type has taxonomies with 2 levels (top-level categories and sub-...
0
votes
0answers
8 views

Same Permalinks for Custom Post Types and Category Taxonomy

I am trying to figure out how it is possible to use the default WordPress Category taxonomy across my entire WordPress site, including three custom post types that I have defined. I would like to ...
0
votes
0answers
17 views

sub categories and products that are directly assigned to main category not displaying

I have a scenario in which i have a side bar. In side bar all the main categories are displayed. There are also some sub categories that are assigned to main categories. Now i want to display both sub ...
1
vote
1answer
31 views

How to get the number of child categories a specific parent category has?

How do we count the number of child categories of a parent category? I am using a custom taxonomy, called: "authors". I found this code, which does count the number of child categories, but only ...
0
votes
0answers
19 views

Taxonomies not display the content

I create a custom post and a page to post a specific content. My functions.php: add_action( 'init', 'create_post_fotos' ); function create_post_fotos() { register_post_type( 'Fotos', array( ...
0
votes
0answers
11 views

Use tax_query to sort posts by most “categories in common”

I know I can use tax_query but what I really want is to sort them by "most categories found that are equal" Is there a way to do it easily?
0
votes
0answers
16 views

Display admin notice on category creation

I'm trying to display a custom admin notice when admin creates new category but can't make it work. My code so far is: function pippin_admin_notice() { echo '<div class="updated"><p>...
0
votes
0answers
28 views

Custom Post Type Re Write not working

I am trying to get my custom post type single.php URL to have the category in it. I am using the default wordpress categories (I didn't register a custom tax.). My current URL (from the base) looks ...
0
votes
1answer
26 views

Best approach to allow front-end display of posts’ reviewers?

My first question here; please forgive any protocol lapses. I manage an academic journal that publishes on Wordpress. We use Co-Authors Plus to allow collaborative articles. Each article also has two ...
0
votes
1answer
24 views

Attachment Metadata inside of Loop

Basically, I'm trying to call attachment info to display withing a loop, for use in an image gallery. I know I need to use wp_prepare_attachment_for_js($attachment_id) but I can't seem to get anything ...
1
vote
1answer
49 views

Could not insert term into the database

I've spent a fair while reading about the "Could not insert term into the database" error, but the fixes I have read (changing theme, fresh WP install, disable plugins) simply are not working. I ...
0
votes
0answers
26 views

How to get post count including nested categories

I am traversing through categories using function like this function hierarchical_term_tree($category = 0) { $r = ''; $args = array( 'parent' => $category, ); $next = ...
0
votes
0answers
41 views

Issues with custom taxonomy

Having issue with url structure and pagination for custom post type and custom taxonomies. We have the category page of custom taxonomy working on first page but on others it gives error. Example of ...
2
votes
0answers
63 views

Can we have same term slug in different taxonomies?

I am having problem when creating term with same slug in different taxonomies. I researched that Unique key is removed from slug in wp_terms table, so i am getting problem to figure out that why i am ...
0
votes
1answer
18 views

Suggest Users basing on User taxonomy

My question is for getting informations or directions about how to move for a task I have to do. This is just a request for advices due to the fact I'm not an expert in wordpress development. My task ...
0
votes
0answers
24 views

Terms showing empty inside a loop

I have the following problem: I have 2 taxonomies that belongs to a custom post type What i want to do: Loop = taxonomy 1 loop = taxonomy 2 loop = post type My code works but, it shows ...
1
vote
1answer
37 views

Taxonomy archive page WP_Query does not return get_the_permalink() or get_permalink() value

In a taxonomy archive page, within the following loop: $type = 'classes'; $page_taxonomy = get_query_var( 'classes_class_type', 'yoga' ); wp_reset_query(); $args=array( 'post_type' => $type, '...
0
votes
0answers
20 views

Relating two taxonomies together

I'm trying to link two taxonomies together: retailer and category. Each retailer will mostly be assigned to the same category so I thought if I can associate the retailer with the category from the ...
1
vote
3answers
62 views

How do I apply style to each category of a list?

I need to create a simple plugin to show a list of categories inside the body of the post and, as I am new to coding, I searched for the basics and started to make little changes; it looks like this, ...
0
votes
0answers
24 views

Permalink custom post type and custom taxonomy

I have problems with making permalinks. I have multiple custom post types. Lets say cpt1 cpt2 cpt3 I have one custom taxonomy with few categories. Lets say : cat1 cat2 cat3 All custom post ...
3
votes
0answers
69 views

Hook to process a new taxonomy tag before it is created?

I am working on a website where there is a custom taxonomy for places, which can be either cities or states. The users are supposed to tag each post with a city and a state. To deal with ...
0
votes
1answer
34 views

Foreach inside foreach

I got two taxonomies: "Colours" and "Recommended Colour" both have the same terms (same colours). I want to display a list of all terms of the taxonomy "Colours" and mark one colour as recommended. ...
0
votes
0answers
27 views

How To Create Custom Taxonomy For BuddyPress Activity

I want to create custom taxonomy for buddypress activity post type so admin can categorize activity posts like assigning categories to standard Post type. I can not find any tutorial / article or ...
0
votes
0answers
17 views

I want to add tag id to search query in wordpress

I have a custom search form which get result like this http://localhost/car/?post_type=cars&vehical=sports-car&manufacturer=truck&country=australia&state=new-yourk By using this ...
-1
votes
1answer
22 views

Taxonomy listing issue - does not display how I would like

What I have is a: Taxonomy: menu_type Term: drink (parent term) Sub term: drink 1, drink 2 (child terms) Term: appetizer (parent term) Sub term: appetizer 1, appetizer 2 (child terms) I ...