0
votes
0answers
93 views

Using get_terms() as shortcode attribute

Hop you pepople would be fine. I'm creating a shortcode with the following code. $categories = get_terms( 'project-type' ); foreach ($categories as $category) { ...
0
votes
1answer
258 views

get_terms function not returning anything

This has had me baffled for days so any help would be appreciated. I cannot get the function get_terms to return anything. I've tried the following code in the index.php, single.php and page.php, ...
0
votes
1answer
108 views

exclude parents from the_terms

I'm using this function to get the categories linked to the post: the_terms($post->ID, 'portfolio-type', '<p><b>'.__('Categories:','om_theme').'</b> ', ', ', '</p>'); the ...
-1
votes
1answer
517 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 ...
0
votes
1answer
486 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
1answer
178 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
2answers
62 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 ...
0
votes
2answers
441 views

How can I get category ID by category name?

I have a few categories with the same name [some of them are sub-categories]. And I want to get an array of ID's for certain cattegory name. I tried this: $term = get_term_by('name', $cat_name, ...
2
votes
1answer
481 views

Control term order on a per-post basis

I have a taxonomy in which term order matters, but varies from post to post. So I want to be able to set the order that terms are displayed in on a per-post basis: My first post | Tagged: Apples, ...
0
votes
1answer
1k 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: ...