The get-terms tag has no wiki summary.
2
votes
1answer
32 views
Display custom list of tags in post/page editor with hooks
I used the information posted on this blog post to display specific tags when editing a post. The editors on my site wanted the ability to display pre-specified tags instead of the most popular ones. ...
0
votes
0answers
23 views
get_terms not working in a plugin
I am using the following in a page template....
<?php
$custom_terms = get_terms('my_custom_term');
print_r($custom_terms);
foreach($custom_terms as $custom_term) {
echo ...
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
23 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
25 views
How to add a post counter to the list of custom taxonomy terms?
I am using the below code to display the list (radio buttons) of terms that are currently used by existing custom post type posts:
$args = array(
'taxonomy' => 'typ',
'post_type' => ...
0
votes
1answer
33 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
64 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
55 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
1answer
52 views
tax_query in get_posts() not working?
I'm trying to print out all the posts within every taxonomy for a custom post type called product (jigoshop products). So i get all of the taxonomies using $cats = get_terms('product_cat');, then i ...
1
vote
2answers
58 views
Have a Custom Post Type index page display taxonomy items instead of posts
I have a CPT registered that is called lessons with a custom taxonomy (category) that is called courses. I want the /courses page (archive-courses.php?) to display the individual courses (i.e. "online ...
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 ...
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
1answer
38 views
get a simple array of all of the term names that exist in all taxonomies
I may be going about this all wrong but I'm trying to use get terms to get all of the terms that exist in every taxonomy.
I think this might be a php question.
get_terms allows you to specify which ...
0
votes
1answer
243 views
WPML wp_query not working properly in one language
I have a wp_query for a custom post type and the custom taxonomy, the idea is top display the term name and below each term the associated posts. I have two languages Dutch & French. Query is ...
0
votes
2answers
194 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
votes
1answer
41 views
How we retrieve the 'tags' and 'attachment' of the custom post which is created by wp_insert_post();
I am not able to get the data of post which i inserted by
wp_insert_post();
now i want to get the tags which i stored by
'tags_input' => array('thread_tag' => $tags)
and i also upload an ...
0
votes
1answer
66 views
view subcategories order by id
this code to display subcategories in categories page
i need to view subcategories sort as id subcategories
can anyone update this code to view subcategories order by id
<?php
if(is_category()) {
...
1
vote
1answer
61 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
0answers
64 views
When using the get_terms and trying to order the terms using the 'order' and/or 'orderby' does not work
does this code really get you the categories in the order you want?
$categories = get_terms( 'category', 'order=ASC' );
echo "<pre>";
var_dump($categories);
for me, it does not. In fact, ...
0
votes
1answer
33 views
Problem retriving the post type category
I have a small isuue, this code retrive me the parent categories from a post type.
The post_type is : serial
The taxonomy is : seriale
<?php
$terms = get_terms('seriale','child_of=668');foreach ...
-1
votes
1answer
193 views
get_category_children/ the new get_term_children not work
I have a custom Walker for a Advanced Search, that outputs the categories for multiple search by categories in checkbox. The Problem here is, that i use the get_category_children for the children ...
1
vote
1answer
78 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
2answers
178 views
get_terms orderby name as numbers
I have a custom taxonomy filled with terms such as 'volume 1', 'volume 2', 'issue 1', 'issue 2', 'issue 10' and get_terms orderby name returns list as:
issue 1, issue 10, issue 2 though I need it to ...
1
vote
1answer
110 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
183 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
282 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 ...
-1
votes
1answer
492 views
Isotope Drop Down Categories Filter Function
I have a code in my functions file that I am using to generate a list of categories so that I can use isotope to filter the current page. However I need to know how to -
How to make it a drop down ...
0
votes
1answer
139 views
Attempting to filter posts using get_terms
Using get_terms I've created three lists of term links. What currently happens if I click on a term is to see the archive for that term, what I'm attempting to achieve now is when I click a second ...
0
votes
1answer
110 views
ISOTOPE - Missing/Invalid Arguement Get Terms
I am trying to use the isotope plugin for sorting on my taxonomy page and even though I don't know much about how to set it up, I tried using some advice found on here.
Wordpress and isotope ...
0
votes
1answer
119 views
Get terms in hierarchical taxonomy which are associated with page and are children of a parent term
I have a hierarchical custom taxonomy ("photos"), with 3 parent terms ("color", "location", "year"). Each parent term has several children terms. I have associated the "photos" taxonomy with pages and ...
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 ...
1
vote
2answers
64 views
get_terms on save_post hook
Usually, if I want to check for some attribute of the post I'm about to publish, I will check like this:
$post_title = $_POST['post_title'];
post_title is the name of the title field in the edit ...
0
votes
3answers
158 views
Using get_terms for custom taxonomy in functions.php
I`m trying to retrieve the names of taxonomy items and include them into a theme admin panel.
function retrieve_my_terms() {
global $terms;
$terms = get_terms('taxonomy');
foreach ...
0
votes
1answer
90 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
193 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
1k 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
142 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 ...
0
votes
2answers
48 views
Use get variable when rewritten url in wordpress
I have many pages which have a lot in common. They are supposed to display the same things but according to their own categories.
The logical way to implement this would be to pass a variable through ...
1
vote
2answers
106 views
get_terms with more than x post count
Is there an argument for get_terms which I can fetch terms that only have say over 2 posts associated with it?
I have a terms page which lists all my terms for 'artists', the page is huge but a lot of ...
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
2answers
234 views
get_terms() for custom taxonomy related to another taxonomy
I have this weird thing to do and I have no idea how to do it. Ok, so:
I have two custom taxonomies: collections and categories (both are prefixed, but for the sake of simplicity, I'll use these ...
0
votes
2answers
276 views
How to make a metabox that contains link categories?
I'm looking for some suggestions or tutorial links about how to create a meta box that allows users to choose from a list of link categories. So far I've been looking at this post about taxonomies in ...
1
vote
2answers
116 views
How to add terms to my tax_query based off of the current post
I need the terms in my tax_query to be the ones from the current post. I am trying to this by using a variable. The value of the variable is given by using the get_terms() function.
The problem is ...
0
votes
2answers
176 views
get_the_terms - but only show 4 Posts
I am using this code to load related posts with a custom taxonomy term slug:
<?php
global $post;
$terms = get_the_terms( $post->ID , 'topics', 'string');
$do_not_duplicate[] = $post->ID;
...
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
95 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 ...
0
votes
0answers
19 views
get_terms depth [duplicate]
Possible Duplicate:
Get second level terms of custom taxonomy
I have a taxonomy 'locations' that has 3-level hierarchy. What I am trying to do is to get only the second level of terms ...
