The get-terms tag has no wiki summary.
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 ...
0
votes
2answers
280 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
1answer
111 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
vote
1answer
184 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
1answer
26 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
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
249 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
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()) {
...
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 ...
0
votes
1answer
140 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
121 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
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
124 views
Echo used hierarchical taxonomies parent name
I want to echo my hierarchical taxonomies parents which i used in my posts.
I've see answers about that, but no one didn't help me.
Now i using <?php the_terms( $post->ID, 'mytaxname', '', ' / ...
-1
votes
1answer
195 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 ...
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
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
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
15 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
0answers
49 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
65 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
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 ...