Tagged Questions

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

learn more… | top users | synonyms

1
vote
2answers
724 views

category filter doesn't work in WPML

I translate the categories to another language, but in the main page, the two language categories are all displayed. How can I filter another language? My WPML version is 2.4.1. I found all the ...
1
vote
1answer
242 views

Displaying terms based on loop posts?

I have a shortcode that shows a loop for a custom post type: while ( $loop->have_posts() ) : $loop->the_post(); // do something endwhile; Some of the posts are in categories ...
1
vote
1answer
577 views

meta_key & meta_value not working with get_pages and custom taxonomy

I'm trying to use custom taxonomy with pages. Basically a page has a "relevance" taxonomy, depicting who the page is relevant for. The pages are created in a hierarchy based on the departmental ...
0
votes
1answer
289 views

echo term name outside the loop, using term slug

I have a strange question... I have my term as a variable... $mailer = 'may-2012-newsletter'; And I'm trying to echo on my page the Name of my term, using the variable above. But this is not in a ...
0
votes
2answers
583 views

I want to remove the links from the term list returned by get_the_term_list

I want to keep this category title on my pages, but I don't want it to be a link. <?php echo get_the_term_list( get_the_ID(), 'portfolio_cats', ' ', ' , ', ' '); ?> Can anyone help? Thanks
0
votes
1answer
640 views

How to get the term description in a taxonomy term archive query?

I'm creating a template for a custom taxonomy for my theme. At the beginning of the page, before the loop that lists all the posts associated to a term of that taxonomy, I want to output the ...
0
votes
1answer
1k views

Avoid WP_Query's duplicate posts with taxonomies

Given a blog featuring several categories (such as "Sport", "Nature", etc), I've then proceded to create a custom taxonomy, which allows me to show articles in certain areas of my blog with terms such ...
0
votes
1answer
184 views

Why does my taxonomy code display the first alphabetical term?

What i am trying to do is echo the last hierarchial child term for the taxonomy. My taxonomy is propertytype. My hierarchial structure is: Real Estate (Parent) Commercial (Child) Offices (Child of ...
1
vote
2answers
1k views

How to filter out Categories for specific post types on Wordpress Admin?

How can i programatically change the Category selection menu on wp-admin? is there a hook or filter to edit the Category List? My objective is to filter out specific categories for specific ...
0
votes
1answer
353 views

Implode Taxonomy to hide parents?

The following code will display the child taxonomy term of the parent only. $terms = get_the_terms($wp_query->post->ID, 'propertytype'); $props = array(); foreach ($terms as $term) { if ...
0
votes
2answers
614 views

Remove Parents From Permalink of Hierarchical Taxonomy

I have a custom hierarchical taxonomy called "places" set up with categories like so: Services > Financial Services > Financial Advisors. The permalink for this category listing page is currently ...
0
votes
1answer
149 views

retrieve post slug by post_tags taxonomy

My scenario: I have a part of a site which retrieves all post_tags terms for a specific category the code: query_posts('category_name='. $category[0]->cat_name); ...
2
votes
1answer
63 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 ...
0
votes
1answer
525 views

What are these undocumented arguments for register_taxonomy?

The Wordpress codex has an example of the register_taxonomy() function at http://codex.wordpress.org/Taxonomies that shows arguments that are not documented in ...
2
votes
1answer
1k views

Create an archive page for custom taxonomies

I switched my site from categories to taxonomies for my custom post but I am having trouble getting it to work the same way. For categories I could have templates named something like ...
0
votes
2answers
155 views

Can you have seperate sidebars for multiple taxonomy archives?

I have a site that uses multiple query taxonomy archives. i.e www.sitename.com/taxonomy1/taxonomy2/taxonomy3 Is there a plugin or method to create a dedicated sidebar for each queried taxonomy ...
1
vote
1answer
433 views

Set attachment tags from attachment's custom field data

I currently have a custom field added to my attachment's form called artist_credit using the hook attachment_fields_to_edit. When a person enters a name into the artist credit field, I want it to (if ...
0
votes
2answers
372 views

multi custom fields and taxonomy search

we have a couple of custom meta boxes for product (custom post type). one custom meta box key is area_required_width, and we have numbers input for it when publishing products, now we want to have a ...
1
vote
1answer
240 views

Show list of custom taxonomies when another taxonomy is selected

Hard question to explain here. So here goes: I have a chapter/section scenario I'm trying to work out. The custom post type of "Books" has two custom taxonomies, "Chapters" and "Sections". The ...
0
votes
1answer
696 views

How to Override default update_count_callback for category

Is it possible to override default update_count_callback for category? The default function counts published posts while I want to count private posts. I do not want to register a new taxonomy.
0
votes
1answer
990 views

How to add and display a taxonomy term image in any template? (Taxonomy Images)

How do I add and display an image for a taxonomy term in any template? I am using the plugin Taxonomy Images but I can find the right code snippet that will display the image in all template files. ...
1
vote
1answer
1k views

get_term_children doesn't return an array of children terms

I am trying to get the term children and then check if they exist to display them. But I get no IDs in return of get_term_children command. This is the code: $children = ...
0
votes
2answers
3k views

Get Current Custom Taxonomy ID by Post ID

If I know the current post id that i have in the variable $pid I use $terms = get_the_terms($pid, 'custom_category'); How do I get just the term id/term_taxonomy_id if I var_dump $terms I see what ...
2
votes
1answer
1k views

Show WordPress Custom Taxonomy Items Based On a Selected Item From Another Custom Taxonomy

Let me explain the problem I am dealing with: I have 2 custom taxonomies. One is named "thestate" and the other one is named "thetown". In "thestate" I have listed all the states in the U.S. In ...
1
vote
2answers
252 views

Count posts for each taxonomy term for each month

Cannot figured it out... I need to count how many posts there are for each taxonomy term form each month.
2
votes
2answers
174 views

deleting terms programmatically

I already checked out this page; http://codex.wordpress.org/Function_Reference/wp_delete_term It does not say what happens to the posts that may have been associated with this action. Hence my ...
0
votes
1answer
278 views

Echo the Last Child Taxonomy only (not parents)?

I have a question about how to echo a child taxonomy only. My taxonomy is location. I have a parent location and child locations like so: London (parent) West London (Child) Chelsea ...
5
votes
1answer
556 views

Weird behaviour when adding terms/term_taxonomies programmatically

This certainly looks like a bug to me. I put together the following code for you to test it on a fresh install. Basically, the code will add two sub categories under the "uncategorized" to achieve ...
0
votes
1answer
593 views

Getting the parent from the wp_term_taxonomy

Is there a built in wordpress function that let's me look up the "parent" field of the wp_term_taxonomy table if I pass the TT_ID to it? Something like get_value ( $wp_table_name, $id_fieldname, ...
3
votes
1answer
99 views

How would I leverage custom Taxonomies in this scenario?

2 Tier research: I am building a site for a client that specializes in research travel. They offer 2 tiers of research assistance, "Standard" and "Premium". Each of those levels of service have ...
3
votes
1answer
841 views

How to set a Preset category for custom post types?

For Posts you can have a preset category where all Posts fall if not specified otherwise (settings → writing). Can this be done for custom post types that have a custom taxonomy? The ...
0
votes
1answer
919 views

Invalid Taxonomy

So I registered a custom post type as well as a taxonomy for that post type. I then created a couple items in that taxonomy, but when I go to click on any of them it turns up as Invalid taxonomy. ...
1
vote
2answers
531 views

Get the most popular terms for a custom post type

I’ve hit another small rock in my current project! I’m trying to list (and link) to the archive page for the top 4 most used terms for a custom post type. I have this; ...
0
votes
1answer
989 views

Want Page Descendants when using query_posts post_parent or child_of

I'm trying to use query_posts to list all descendants of a page ID. Using post_parent only lists the first-level children. This Trac ticket seems to address it: ...
0
votes
2answers
766 views

Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function

Check the line; list($term_id,$taxonomy_id) = $result in the code snippet below. ( towards the bottom ). Why am I missing the term_id & the $taxonomy_id when I echo their values? Aren't ...
1
vote
1answer
879 views

is_taxonomy is deprecated. What's the alternative?

Now that is_taxonomy($taxonomy) function deprecated how do I know if a taxonomy exist? What's the alternative? On a second note, the codex for wp_insert_term() says that if the taxonomy does not ...
0
votes
2answers
2k views

List custom taxonomy as navigation - taxonomy pages with all it's posts?

I have no idea how to do this and really need your help please … First I created a custom-post-template called "wr_event" - then I added a custom taxonomy (like categories) to this post-template! ...
1
vote
1answer
208 views

Any way to assign Post Categories and Tags to Links?

I would like to assign post categories and post tags to the links in my 'Links' section, and (ideally) remove the link categories feature since it would be redundant. Anyone know how to do this?
2
votes
2answers
1k views

Importing data from spreadsheet into wordpress DB, along with custom taxonomies and their terms

I am importing a large DB from an Excel spreadsheet into a wordpress DB. I was going to do it manually by creating a new table but decided to import it into the existing wordpress framework as it will ...
2
votes
1answer
257 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 ...
6
votes
4answers
2k views

Plugin to restrict non-admin user to existing tags

Is there a plugin that would restrict non-admin users to only existing tags? I could have used categories for this, but it will be difficult to display with a large population (~1000) of tags.
1
vote
1answer
3k views

Using pre_get_posts to set posts per page, how do I?

I am trying to use pre_get_posts to set posts per page for a single term within a taxonomy. One thing that is throwing me off is setting the term to apply the pre_get_posts to. Here's my code: ...
0
votes
2answers
236 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
642 views

Alternative for is_taxonomy() to workaround theme's default sidebar

My Wordpress theme is using some code in the "sidebar.php" file that tells it that some pages should always use the default sidebar. This was fine until I found that each and every custom taxonomy ...
1
vote
2answers
559 views

Custom Post Type: How to display all of same taxonomy?

Isn't there a permalink structure that will essentially list out all categories of a certain post type? function create_faqs_post_type() { register_post_type( 'faqs', array( ...
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
989 views

How to query term_id of a Custom Taxonomy by name

I have created a custom taxonomy "Birthday" within which i have created various dates like "December-12", "April-15" How to get the term_id of the "December-12" by a query. Thanks.
1
vote
1answer
553 views

Query Multiple Taxominies Across Multiple Post type's

i have searched and found some aprroved answers to similer questions but nothing i could make work or something exactly like my issue... i have 5 custom post type... each one have its own taxmonies ...
5
votes
4answers
5k views

Attaching Metadata to a Taxonomy Item

I have a taxonomy of menus i.e. Coffee, Tea, Sandwiches, Cakes etc. I want to add more information 'about' the taxonomy such as an image that represents it alongside the other pieces of taxonomy ...
0
votes
2answers
378 views

Custom taxonomy in WP_Query not working

I'm truly stumped here. I have a specific taxonomy for sorting posts into different types of "featured" posts on a news site. Here's the problem: When querying by them the results aren't what they ...