Tagged Questions
0
votes
0answers
14 views
Taxonomy page to display top level category as field
i thought I had my issue fixed but I found out that it isn't.
I have code in the sidebar of my archive template that only displays the parent taxonomy terms as links to take you to the taxonomy ...
0
votes
1answer
21 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
32 views
add_query_arg to look up page title
I'm trying to get the code below to look up the status name, i.e. new, open, pending or resolved with the word ticket together to find pages called new tickets, open tickets etc.
$ticket_status = ...
0
votes
0answers
47 views
How to exclude child terms from tax query foreach loop
I have this query which is working fine but I can not get it to exclude child terms and include only parent terms. This is what I have so far --
<?php
$custom_terms = get_terms('videoscategory');
...
0
votes
0answers
58 views
Dynamic Dropdown populated with Categories from current page?
I have a page where it lists the category name with it's posts under. On this page it only lists the posts that are also in another custom taxonomy. To do so I am using this code which works fine --
...
0
votes
1answer
54 views
How to break up php code to avoid echo
I have this php code I am using to list all post (titles) with the taxonomy categories names, and its working fine however I will like to break it up and avoid using echo within the php code so that I ...
0
votes
0answers
22 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 ...
0
votes
1answer
36 views
Retrieve Custom Taxonomies with Description and Slug
I've been looking to grab a list of custom taxonomies for a custom post type with the titles, descriptions and tag but have not been able to progress or find anything helpful.
Breakdown:
I have ...
0
votes
1answer
73 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
2answers
187 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
60 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 ...
0
votes
1answer
35 views
Get only the first term by taxonomy
Maybe it's a stupid question but I can't find the answer.
I have a custom taxonomy (directores) and each director is a term. Some times a film has more than one director. I need to print only the ...
1
vote
1answer
75 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 ...
1
vote
1answer
108 views
How to remove plugin-specific custom taxonomy terms when plugin is uninstalled?
I'm trying to write a class that would allow for easy removal of all plugin-related data when the plugin is uninstalled. Specifically, I want it to remove plugin options, custom post type entries, and ...
-1
votes
1answer
178 views
How to create drop down for child categories of current taxonomy being viewed?
I need to know how can I get the child/grandchild terms of the current taxonomy being viewed, and put it into a drop down so that I can add values to the options.
I am currently using this code to ...
0
votes
1answer
278 views
Display custom taxonomy attached to the post on post single page
I need to display the first custom taxonomy attached to the post on post single page. The custom taxonomy is similar to category attached to the posts. I need to display the first custom taxonomy with ...
0
votes
2answers
74 views
PHP displaying wrong custom taxonomy images
I'm using the Taxonomy Images plugin to try to pull in the category images for custom categories on a page that displays all the categories my site has. For some reason, this code outputs the correct ...
0
votes
1answer
89 views
“Trying to get property of non-object” error when using custom taxonomies
I am encountering a weird error when working with custom taxonomies. I am trying to get the name of categories of a custom taxonomy:
$terms = get_terms('taxonomy_name');
foreach ($terms as $term) {
...
0
votes
1answer
188 views
Displaying custom taxonomy in the admin list of a custom post type
I'm trying to list the terms of a custom taxonomy ('genre') in the overview table in the admin area for a custom post type ('station'). To get this, I tried the following code in my theme's ...
0
votes
2answers
991 views
Advanced custom fields - taxonomy terms images
I used the Advanced Custom Fields plugin to add a custom field to my taxonomy. That custom field is an image which is associated with the term. Now I have a page where I display a list of all terms ...
1
vote
1answer
141 views
How to add contents of a custom field to a taxonomy term list?
I have a custom taxonomy term of 'artists' which is the artist's last name and a custom field of 'first_name'. To create a list all all artists with both their first name and last name I am using the ...
4
votes
1answer
124 views
Return only the custom sub-term for custom post type, do not echo term-parent
I've made a custom function that retrieves the custom taxonomy term for a list of posts in a query, and echos both the name and the link. Additionally, it also excludes listing a term if I specify the ...
0
votes
1answer
316 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
93 views
Unable to get the Parent Custom Taxonomy Terms
I am unable to get the Parent Taxonomy Terms here is the code i am writing
$myterms = get_terms( 'iqvis_event_category', array( 'parent' => 0 ) );
echo '<pre>';
print_r($myterms);
echo ...
1
vote
1answer
181 views
Show only the grandchildren (using get_terms)
I'm working with a hierarchical taxonomy (named "world") that has 3 levels to it (Regions > Countries > Indigenous Peoples). At the moment I'm using a modified version of this code to paginate ...
0
votes
2answers
1k 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
0answers
100 views
Display Terms for all posts in Current Archive or Query
I am using the following code to create a list of linked terms belonging to a taxonomy.
<?php
$taxonomy = 'taxonomy_name';
$queried_term = get_query_var($taxonomy);
$terms = get_terms($taxonomy, ...
1
vote
1answer
285 views
how does get_term_by know which term to return when the same term appears twice in a hierarchical taxonomy?
This is from the codex.
<?php get_term_by( $field, $value, $taxonomy, $output, $filter ) ?>
Suppose I have a taxonomy system as follows;
taxonomy: "healthy foods"
and it's a hierarchical ...
0
votes
2answers
1k views
get_terms of post->id
I need a way to use get_terms and have it only grab the taxonomies of the current page. Example http://sitename.com/genre/hip_hop would only grab the taxonomies that also have the hip hop genre ...
0
votes
1answer
357 views
Custom taxonomy term as class?
I'm trying to add a class to a container within a query, ideally I'd like to use the terms from a custom taxonomy I have setup (guide-categories).
As an example:
<div class="myclass *taxonomy ...
0
votes
1answer
1k views
Display Child Categories of Current Post ID
I'm starting to love this place more and more, super helpful!
Anyway, todays dilemma is as such:
I want to display as a list the child terms only, of a specific parent term, of a custom taxonomy, ...
0
votes
1answer
754 views
Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
I'm trying to get the terms of a taxonomy (kind) and the number of content they have but only for a specific category (get_parent_page_slug() = city name = category slug). This is what I have so far:
...
1
vote
2answers
5k views
Get the the top-level parent of a custom taxonomy term
How would I get the top-level parent of a given term?
I am using wp_get_object_terms to get taxonomy terms on posts, but instead of showing all tagged terms, I only want to show tagged terms' ...
2
votes
1answer
2k views
How to only list the child terms of a taxonomy and not their parents?
I'm creating an age select menu in the admin, populated from a taxonomy of age. The taxonomy is hierarchical as follows:
18-25 (parent, ID 183)
18 (child)
19
20
21
22
23
24
25
26-30 (parent, ID ...