New answers tagged

0

This seems to be a core bug, spotted at 4.5 as well. Although documentation implies otherwise, you can not select in practice terms of non hierarchical taxonomies with the "checkoxed" metabox, the only working option is the "tag" style metabox.


0

echo term_description( $term->term_id, $taxonomy );


0

Although the hooks are passing you the ID of the changed object in the parameter $object_id, you aren't using it and are calling get_the_ID instead which will give you the ID of the current loop item. Try changing your uses of $post_id to $object_id instead.


1

It is because you're using a reserved term "year". https://codex.wordpress.org/Reserved_Terms


0

You will find the Codex Action Reference handy - while it doesn't list everything, it gives a good overview of action order which can help locate the correct action if the one you're using runs too late. In your case, wp does indeed run after the query is run, but looking at that list it appears - depending exactly on what logic you're wanting to run - that ...


0

Some passing by can eventually find an answer to this question here. Same community but more proactive there. Weird.


0

You've got the slug of the term in the query string, so you can use the get_term_by() function to get the term object. For example, assuming your taxonomy name is 'dir-type': $country = get_term_by( 'slug', $_GET['country'], 'dir-type' ); Using that, you can then print out information from the term object like this: echo $country->name; // print the ...


0

Try to get the value of querystring $country = $_GET['country'];


0

I managed to do it. I used the following query parameter: 'tax_query' => array( array('taxonomy' => 'wpccategories', 'field' => 'slug', 'terms' => $termz ) ) With $termz being: $termz = ...


1

Googling get_terms gives the WP developer hub page for get_terms as the first result, for which the first example is this: $terms = get_terms( 'post_tag', array( 'hide_empty' => false, ) ); Using this as a basis we get: $args = array( 'taxonomy' => 'product_cat', 'number' => 5, 'orderby' => 'name', 'parent' => 11, '...



Top 50 recent answers are included