The tag has no wiki summary.

learn more… | top users | synonyms

6
votes
2answers
222 views

Assign posts to taxonomy terms instead of the taxonomy terms to posts?

So I have a custom post type (people) with a related custom taxonomy (directory). Instead of editing a person and then choosing the related directory organizations I'd like to "edit" a directory org ...
5
votes
1answer
3k views

Custom Taxonomy and Tax_Query

I've been having a lot of trouble getting a WP_Query running with a tax_query on my custom taxonomy. I'm 99.9% sure that my register_taxonomy is correct, as I'm able to tag posts with the right term, ...
5
votes
3answers
2k views

Modify Taxonomy pages to exclude items in child taxonomies

I found this question: Theres a way to use $query->set('tax_query' in pre_get_posts filter? which seems to indicate that yes, you can alter the taxonomy query on taxonomy archives via ...
3
votes
2answers
2k views

wp_get_object_terms() to get a list of all the terms attached to all the posts in the current query

How can I use wp_get_object_terms() to get a list of all the terms attached to all posts in the current query? For example, for the current query I want to get an array of the terms from the "Alfa" ...
2
votes
2answers
2k views

Advanced Tax Query

Below is my tax query, at the moment this returns all posts which have at least one of the specified terms. Is there a way I can have it return only posts which have ALL of the specified terms? ...
2
votes
1answer
739 views

Exclude from search all custom posts which are NOT in a taxonomy term

I have a custom post with a taxonomy associated to it. That taxonomy only has one term, and posts either belong to it or not, in a boolean fashion. On the search results, I wish to show the custom ...
2
votes
4answers
3k views

Taxonomy: Why 'with_front' => false DOES NOT WORK?

Seriously, why 'with_front' => false does not work as it should be? It is supposed to remove TAXONOMY BASE NAME and my question is why it does not work? I just dont want the taxonamy base slug ...
2
votes
2answers
2k views

Improving WP_Query performance for multiple taxonomies

I have a site with several custom taxonomies, and have found that one of the slowest parts of the site is attempting to query with an OR across several of these at once. I'm using a WP_Query like so: ...
2
votes
2answers
226 views

Paginated Taxonomy Term Archive including one post per term

I have a custom query which gets all the custom taxonomies for the custom post type and displays the latest post in each. At the moment it pulls in all the taxonomies. Is there a way I can limit the ...
2
votes
1answer
3k views

How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy

This answer provides the code for a query that returns an OR match on a taxonomy term: global $query_string; $args['tax_query'] = array( array( 'taxonomy' => 'status' ,'terms' ...
1
vote
1answer
846 views

How to Get All Taxonomies AND All Terms For Each Taxonomy With Post Count Zero

Is there an easy way of obtaining every registered taxonomy and for each registered taxonomy, get all the terms for that taxonomy, and for each term, get the post count, without actually fetching all ...
1
vote
1answer
22 views

Advanced Query Logic With Multiple Taxonomies

I have a page on my site that acts as a search tool/search results page for users to find rental spaces. On the left side is a column of checkboxes that let the user filter the results by three ...
1
vote
2answers
50 views

Strip post_tags from list of returned taxonomy terms

Thanks to GhostToast for helping me on my way with this post. Now I am successfully able to echo out all of the taxonomy associated terms dynamically. However, this unfortunately also seems to spit ...
1
vote
2answers
346 views

$wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies

It's easier if I made an example: I have a custom post type MYPOSTTYPE, with 3 taxonomies TAX_1, TAX_2 and TAX_3 If I have 3 terms: 'TERM_TAX_1' in TAX_1, 'TERM_TAX_2' in TAX_2, and 'TERM_TAX_3' in ...
1
vote
1answer
215 views

Changing stylesheet depending on custom taxonomy terms

My client would like the background & header colors to switch depending on terms within the custom taxonomy 'Grades'. These terms are kindergarten, first grade, second grade, etc... (all ...
1
vote
1answer
96 views

Advanced Custom Field - displaying only 1 post- how to get all posts displayed

I have two post types: post type = stores which has a title and custom field (by ACF) storeurl. I have another post type called books with just title and custom field bookcode (by ACF). I ...
1
vote
0answers
19 views

Exclude posts which have any term in a certain taxonomy from the query

I have a custom taxonomy, and for a certain query I am doing, I want to retrieve all posts which do not have any terms of that taxonomy assigned (for example, they are tag-less). At the beginning I ...
1
vote
1answer
22 views

Custom taxonomy [year] is directing to yearly archive

My custom taxonomy is linking to yearly archive instead of the post linked to it. I have created a custom taxonomy named "year" containing int (i.e 2008,2009,2010 etc). Have registered the custom ...
1
vote
0answers
47 views

Automatically Query Parent Taxonomy

I have a custom taxonomy on my site that I query from the sidebar of the currently displayed term. Say I am on the Term X archives, then my custom post type of Products with the term of Term X are ...
1
vote
0answers
201 views

How to fetch the data from Advanced Custom post when we search specific keyword or field name related to the post?

Actually i have created a custom post type and fetch the data from "Advanced Custom Fields" plugin after then connect to a custom search-form to search only the post data.It works good. But now i ...
1
vote
2answers
433 views

Custom Post Type Taxonomy Filters

Im really struggling to piece this functionality together, and hope someone can help or provide snippets to get me there. So I'm creating a section on a website where stories are published, I have ...
1
vote
0answers
173 views

Using multiple taxonomies to sort Custom Posts

I have a post type that includes a taxonomy for (1) location and (2) a day of the week. I'm using the first taxonomy to sort the posts into groups. Here's the loop I'm using: <?php $terms = ...
1
vote
0answers
69 views

can these 3 queries be re-written as 1 query?

I am creating a Dentist directory site, and I have a taxonomy archive page which requires particular grouping and sorting (see below). So far I have only been able to achieve this using 3 WP_Querys ...
1
vote
0answers
148 views

Query most popular terms by taxonomy over 2 week period

I have written SQL for a query that pulls the most used taxonomy terms for selected taxonomies that are published, do not have a parent post are not in a comma separated list over the past two weeks ...
1
vote
2answers
365 views

Custom taxonomies making WP very slow - Way to fix?

I've set up three custom taxonomies within my theme for attachment post types within Wordpress 3.5.1. One taxonomy is non-hierarchical (i.e. tags) and has about 800 terms in it. (I'm using WP to build ...
0
votes
1answer
313 views

How to add images to taxonomy terms? [duplicate]

Could it be done or not? E.g. I want to be ble to upload an image when creating a new taxnomy term. So, when I create a new term called Mercedes in my custom made taxonomy called brands how can I ...
0
votes
1answer
71 views

How to list tags from custom post type attachments?

So I am trying to list out all the tags created for images uploaded within my custom post type only. I added in a snippet of code to my themes functions.php file to enable media categories and tags: ...
0
votes
1answer
273 views

How to reduce the database query-es

Hy, i make a slide for news, the question is how can i reduce the dathabase queries...ore how can i compress this code... http://s16.postimage.org/bswe0vrph/queries.jpg <div id="featured" > ...
0
votes
1answer
97 views

WP_Query tax_query - Show results if child has parent X

I've made a custom search which includes a 3 tier custom taxonomy that looks like this: continent - country - - state The search is formatting in the above way. Here is my problem: Example data: ...
0
votes
1answer
101 views

How to List Custom Post Type Titles Based on Theirs Taxonomy Terms Inside a Nested Loop

I am trying to list at least the last three updated Custom Post Type's title lets call it "Cast" inside another loop which is listed based on the Taxonomy terms called "Actress" I used the following ...
0
votes
1answer
87 views

How to modify the query in taxonomy-custom.php to sort term archives by a custom meta field?

I am trying to create theme pages for custom taxonomy terms in which the archives are ordered by a custom meta field. I can do this with a new wp_query as follows: <?php ...
0
votes
1answer
70 views

Query custom taxonomy for category including children

I've using the Events Manager plugin which creates a custom post type of 'event' and a custom taxonomy called 'event-categories'. I have the category 'courses' which has an ID of 43. I also have a ...
0
votes
1answer
225 views

Custom Post type Query by Taxonomy

This has been driving me nuts for hours. I've checked numerous pages on the web for an answer but I can't find one. I'm trying to get all of the posts from a custom post type, that are attached to an ...
0
votes
1answer
369 views

Single.php for Custom Post Type > Taxonomy > Term

I have a custom post type - Films. It has a taxonomy of Film_cat, which in turn has two terms/categories - Term1 & Term2. For each single post within Term1, I would like to display a specific ...
0
votes
1answer
56 views

Variable Not Working Inside is_author() Array

I'm using a plugin (User Groups) to separate out users into, well, groups, and I need to figure out a way to create a conditional to check if an author is in a certain group. So, using get_term_by and ...
0
votes
1answer
93 views

Get posts by term slug only

What I'm looking to do is build a shortcode to that will display a list of posts based on the taxonomy slugs passed to it. But as far as I can tell, you can't use just a term's slug to pull posts in ...
0
votes
1answer
135 views

Get ID and slug from taxonomy object

I have a custom field to select a category (custom taxonomy) and then I will display a list of all of its child-categories. This works fine when I return the custom field as "term_id." HOWEVER. I ...
0
votes
2answers
1k views

Get Taxonmy Term ID For Current Post

If I wanted to get the category ID for the current post, I would use something like this: <?php foreach((get_the_category()) as $category) { echo $category->cat_ID . ' '; } ?> How can I do ...
0
votes
1answer
227 views

Sort query output on taxonomy term archive by post type using pre_get_posts

I'm using pre_get_posts to adjust the main query of the taxonomy term archive. What I would like to accomplish is that the output is listed by post_type. I have a total of 4 post types and I want to ...
0
votes
1answer
192 views

Tax_Query using WP_Query not working

I cannot get this query to work properly. It just renders one post even though I have three posts that are categories in the 'Firm News' and 'Test' categories. Can anyone see a problem with my code? ...
0
votes
1answer
197 views

How to display posttypes and taxonomy in standard posts, not in a separate label?

I want to display some taxonomies directly in "Posts" label, as standard post, not in a separate label like "Books" for exp., but i don't know how. Is there a way to do this? This is the code: class ...
0
votes
1answer
210 views

CPT archive page - show one post from each taxonomy term

Basic loop question: I have a custom post type with a custom taxonomy and 3 terms. On the archive page (archive-custom_post_type.php), I would like to display one post from each taxonomy term. Is ...
0
votes
2answers
1k views

Use have_posts() with array of post results retrieved by $wpdb->get_results

I don't know if I'm retarded, crazy or just plain genius or not, but I've decided to use tags as a way to link content site-wide (a big ol' many-to-many relationship website for archiving various ...
0
votes
1answer
572 views

taxonomy query to output slugs instead IDs

So I got a custom search form with three dropdowns containing three different custom taxonomies. The problem is, I'd need the taxonomy slugs in the address for the search to fuction properly, because ...
0
votes
2answers
233 views

Tax Query trouble

I can't seem to figure this out. The following query works: $xxxx = new WP_Query(array( 'listset' => 'homepage', 'meta_query' => array( array ( 'key' => 'show_home', ...
0
votes
1answer
1k views

Exclude specific taxonomy term when using wp_get_post_terms

i have a single-post_type.php file where i constructud a breadcrumb (or similer to) i am currently using this to get the terms of this taxonomy: $terms = wp_get_post_terms( $post->ID, ...
0
votes
1answer
46 views

Display only first level children of my custom taxonomy categories

I'd like to display only first level children of my custom taxonomy categories I'am using wp 3.8 I've something like for my taxonomy "listing_category": Category 1 SubCattegoy1 Subsub category1 ...
0
votes
0answers
132 views

List post in wp-admin and sort them

this is my first public plugin called Sort posts in taxonomies. With the plugin I intend to list regular posts and custom post_types in the Category(Taxonomy) edit page in wp-admin. Further give the ...
0
votes
0answers
49 views

Query posts filter not working

I have created one custom post type which name is villa. In this post type I have added five post and assigned custom field values(mention bellow): Post Name Assigned Fields 1. Chalet ...
0
votes
0answers
28 views

Hiding an Advanced Custom Field based on Taxonomy Field selection

I am trying to to show/hide one advanced custom field based on the ACF taxonomy field without any luck. I have tried reworking this example a bit to fit my needs but nothing happens. Any ...