Tagged Questions
1
vote
1answer
24 views
Can't set custom taxonomy terms via custom form
Question
I am creating my first plugin and in it users will be able (among other things) to create new post via custom form from wordpress backend. This post uses custom post type and custom ...
0
votes
1answer
27 views
get_term_link not working
I am trying to use the below code snippet to display an image and then wrap it in a link to a specific term archive page. In this case, I have a custom taxonomy (Series) with a few different terms. ...
0
votes
1answer
42 views
Custom Post Types Archives and Single Pages not showing custom taxonomy data
I have a custom post type called "Newsitems" that I have registered two custom taxonomies for: "newsitem types" and "news item tags"
I want these two taxonomies' terms to appear almost like the ...
0
votes
1answer
35 views
Changing taxonomy term by slug (wp_update_term)
What I am trying to accomplish is to update a taxonomy term name using its slug rather than the $term_id
Wordpress does this by:
<?php wp_update_term( $term_id, $taxonomy, $args ) ?>
Is it ...
0
votes
1answer
24 views
If post has ANY term attached to it, get the first one only
I am developing a theme that has several custom taxonomy that act as radio buttons.
How do I write a conditional that does...
if(post_has_any_terms($post->id, 'custom-taxonomy')) { echo $term; ...
0
votes
0answers
23 views
Create Pagination in Term list
I need to create numeric pagination in term list.
Is there some options I can do this, i need to create a numeric pagination like the one we have for posts using wp-page-navi.
Here is the code I am ...
1
vote
1answer
62 views
non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
I registered a non-hierarchical custom taxonomy ('property_features').
There is a checkbox for every terms of this tax in a custom meta box on the edit-screen.
All terms are displayed and all terms ...
0
votes
1answer
25 views
Show all terms in a custom taxonomy with all child terms wrapped in a ul
Is there a way that I can list all the terms within a custom taxonomy in an unordered list and wrap all child terms in another unordered list?
For example;
<ul class="menu">
...
0
votes
0answers
33 views
How to show the term description on single page?
I try to show show the term's description on a single page, but something not works. Same code is working on taxonomy template.
term_description( '', get_query_var( 'collections' ) );
1
vote
2answers
50 views
How to List Parent Term Links for Custom Taxonomy With & Without Children?
I have a Custom Post Type of "projects", that is categorized by a Custom Taxonomy of "industry", which is heirarchical. Projects & sub-projects are assigned to the industries. For Example, the ...
1
vote
0answers
21 views
Ordering taxonomies by rank
I'm using a function (copied and modified a bit from this question ) which displays taxonomies in order by rank with » between parent and child and | between terms, but I get a mistake in the html ...
0
votes
0answers
16 views
getting terms that have the same posts
I have 2 taxonomies, category and state and I've some pages like this:
main-category > child- category > child-category-2 > states.
On the last page I need to list only the state terms that have ...
0
votes
1answer
63 views
How to list posts by term (custom taxonomy)
I created a custom post type (portfolio), with custom taxonomy (portfolio-category).
I created a template, this template lists all "portfolio" posts.
<?php while ( have_posts() ) : ...
0
votes
0answers
23 views
Group Date Archives by term_id
I am trying to group posts in Yearly date archive page by term:
here is the code I am using :
<?php
$terms = get_terms("publicationcat");
$count = count($terms);
if ( ...
0
votes
1answer
59 views
stdClass::$labels /wp-includes/general-template.php undefined
In my <title> tags I am getting undefined on a custom taxonomy in a custom post type and im struggling to find a way to set it.
<title><br />
<b>Notice</b>: Undefined ...
0
votes
1answer
44 views
Order taxonomy terms wordpress
It seems like something really simple, however I can't find a good solution to what I am looking for.
I created a page template that shows all my taxonomy term of a taxonomy called "news" eg:
paper1, ...
1
vote
0answers
70 views
get_terms not returning any custom taxonomies
I have a custom post type called project with custom taxonomy called tagportfolio
I use this code to generate both:
add_action('init', 'project_custom_init');
/*-- Custom Post Init Begin --*/
...
1
vote
1answer
67 views
Show posts from two or more custom taxonomy terms
I want to show posts which are filed 2 or more custom taxonomy terms. For example, I want to show the posts from custom post type "Classified" and filed under Books and House terms.
The code below ...
0
votes
2answers
204 views
Display current taxonomy term when inside custom post type
Well, this should be pretty simple, however I couldn't find answer anywhere on the web. all answers I found were close but no exactly what I needed.
what I need is to display just the current term of ...
1
vote
1answer
114 views
Getting Term ID from Term Name for WordPress Query
I am trying to get term ids from term name and cannot figure out why this code is not working.
$excludes = '';
if($filtering_excludes) {
$exclude_terms = explode(", ", $filtering_excludes);
...
1
vote
1answer
63 views
Echo custom taxonomy term name
I would like to echo out the term name from a custom taxonomy 'recipes' but all I get is the word "recipe" when it should say eg "pizza recipe". Is name the right argument here or I am mistaking it ...
1
vote
1answer
79 views
How to determine the depth of a term in a custom taxonomy?
I'm building a <select> dropdown to display a list of terms for a custom hierarchical taxonomy. How do I know the depth of each term? I'd like to add some indentation for child-terms (the more ...
0
votes
1answer
92 views
Get post terms with hierarchical relationships
I'm having a hard time getting a set of selected terms in a custom taxonomy presented in a specific way.
I have a hierarchical taxonomy 'places' and a post with the tagged terms:
England (x)
- ...
0
votes
1answer
111 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 ...
0
votes
1answer
86 views
Post to inherit custom category background image from parent
I have a custom field on a category where you can add an image. I have it as a background image to show on the category's archive page, like so:
archives.php
<body style="background:url('<?php ...
0
votes
0answers
62 views
How to pass the term slug to the ajax function as a parameter [closed]
this is the original code of the script
var $mainCat=$('#main_cat').val();
and i replaced it with this
var $mainCat=$('#<how to pass the slug here>').val();
echo '<ul>';
foreach ...
0
votes
1answer
61 views
List related terms + taxonomies
I have a set of main categories for a set of products. All these products has additional taxonomies associated with them.
On a product category page, is there a way I can get all terms in use for ...
2
votes
2answers
191 views
Dropdown: Display terms from B only if has relationship with a term A selected
I've googling for a solution for this issue and found nothing: I have some posts from a Custom Post Type (Restaurants) and its taxonomies ('city' and 'cuisine'). Whenever I create a restaurant post, I ...
2
votes
1answer
189 views
Get terms that contain posts that in turn belong to other terms?
So I have custom taxonomy called "shape" and another one called "color". If I want to get the list terms under shape that contain posts that are also present in terms under color, how do I do that?
...
3
votes
1answer
184 views
Retrieving custom taxonomy in order, but excluding specific tax IDs
I have a function set up and working based off the discussion in this thread: Custom taxonomy, get_the_terms, listing in order of parent > child.
My version includes term links and allows me to ...
2
votes
1answer
103 views
Glossary with Custom Post Type
I´d like to make a glossary. It should looks like:
Index-Nav
0-9 | A B C ... M ... X Y Z
B
BMW
M
Mercedes
...
ALL entries from index-nav (A-Z, O-9) should be visible in a <ul> and should ...
0
votes
0answers
16 views
Getting Parent Term ID [duplicate]
Possible Duplicate:
Get the the top-level parent of a custom taxonomy term
I'm in a hierarchal custom taxonomy and I want to get the root parent term id.
Something like
...
1
vote
1answer
145 views
Listing all term items alphabetically / sorting loop
I have my own custom post type and it has its own taxonomy and terms.
Whenever user visits http://example.com/mytaxonomy/myterm I want the page to display all items within this term alphabetically.
...
0
votes
1answer
29 views
Page for custom taxonomy
I'm a newbie in WordPress and I've just created a new custom-taxonomy called categories under a custom post type called arts. Is there a way I can create a custom page to display the 'categories's ...
1
vote
0answers
34 views
How to get a list of taxonomy terms which are being used only within certain post types?
I have a custom taxonomy called 'locations' which is being shared across a bunch of post types. I want to make a select field dropdown list of my locations (terms) to let users go to the taxonomy term ...
1
vote
1answer
72 views
Rewrite rules for varying nested terms of custom taxonomy
I've searched the net an the only working solution to this seems to be this post by Jeff which does everything except handle nested terms.
Does anybody know how to change the rewrite based on the ...
0
votes
1answer
141 views
Does WordPress limit the length of slug names for Post Meta or Terms?
The WordPress Codex states the the Post Type Names and Taxonomy Names have a limit to the slug name.
Register Post Type -- max. 20 characters, can not contain
capital letters or spaces
Register ...
10
votes
2answers
161 views
Hierarchical taxonomy UI
I don't like the way the taxonomies are displayed within the Wordpress admin and was wondering if anyone knew the best way to hook in and change it. Currently if I select some terms within my post ...
0
votes
2answers
378 views
Adding Multiple Values to a Post Meta Key
I have a question about adding multiple post meta values to a post meta key.
Here is a link to the WordPress add_post_meta(); function in question.
The $unique parameter is a little on the fuzzy ...
0
votes
1answer
320 views
How to get the top most term (top ancestor) of a custom taxonomy child term?
I need to get the topmost term (top level ancestor) of a taxonomy term.
Suppose the following term hierarchy:
North America
United States
New York
New York ...
0
votes
1answer
46 views
Running a function only once when a taxonomy term is changed
Probably quite a simple problem.. I have a custom post type with taxonomy terms. I wish to run a function from my functions.php whenever the admin ticks a specific term box.
My original thought was ...
0
votes
0answers
66 views
How to get the hierarchy position of a taxonomy term? (how many children after / how many ancestors before)
I have a taxonomy "location"
In this taxonomy I list locations, hierarchically, from country to state to city. For example, consider the following terms nested like so:
1. European Union
...
1
vote
0answers
76 views
How to display term description in empty terms archive?
I list all terms from a taxonomy, even the empty ones, but I found out that at least in 2010/2011 themes I got a 404-like message, the default seems to only display the term description when at least ...
1
vote
2answers
90 views
Creating a function that receives the taxonomy terms that have been changed in a custom post type
Ive been looking into actions and hooks etc... from wordpress, but cant seem to do a very simple thing. I just want to execute a function whenever a post is updated, and within the function I want the ...
2
votes
1answer
448 views
Edit post meta with checkboxes on front end
I'm trying to build an interface so that two custom fields for a custom post type can be edited on the front end with checkboxes. I'd like to display empty checkboxes if neither of those the fields ...
0
votes
1answer
115 views
Custom taxonomy not saving correctly
I'm using a custom post type and a custom taxonomy to display a list of properties and its type in a page. It's working fine but for some reason some of my posts' taxonomies aren't getting saved ...
0
votes
1answer
132 views
array_pop() expects array, boolean given for $event_type_term ->slug
I have the following function I wrote …
add_filter('post_type_link', 'events_permalink_structure', 10, 4);
function events_permalink_structure($post_link, $post, $leavename, $sample) {
if ( ...
1
vote
0answers
181 views
List Posts For Terms Of A Custom Taxonomy For Any Post Type
The function is great and i am using this function with these filter to just display selected taxonomy term posts by id, but what result i am getting is like this
Child Taxonomy 1
- Child Taxonomy 1 ...
0
votes
1answer
420 views
Get second level terms of custom taxonomy
I want to get second level terms of a specific parent (first-level) term in a custom taxonomy. Sounds complicated but would be useful.
Term 1
SubTerm-1.1
SubTerm-1.2
SubTerm-1.2.1
Term 2
...
3
votes
1answer
276 views
Determine if Term has Grandparent/Great-Grandparent
I have a custom taxonomy (hierarchical) for which I'm outputting the results. For example's purpose:
--Drinks
----Tequila
------Reposado
------Blanco
----Beer & Wine
------Beer
------Wine
...