Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 4771

A taxonomy is a generic "category" used to organize posts and custom post types

1
vote
$taxonomy = 'taxonomy-name-here'; $queried_term = get_query_var($taxonomy); $term = get_term_by( 'slug', $queried_term, $taxonomy ); echo $term->name; …
answered Aug 24 '11 by Milo
2
votes
The term ID is contained within the term object you are already using in your loop: echo z_taxonomy_image_url( $term->term_id, 'thumbnail' );
answered Jul 12 '17 by Milo
3
votes
I think you mean you want to create terms in your taxonomy? Have a look at this answer for detecting when a theme is activated. Then use wp_insert_term to insert the terms into your taxonomy. …
answered May 14 '11 by Milo
1
vote
The issue with a taxonomy screen on the admin side is that it isn't a taxonomy archive. An archive is a collection of posts, a taxonomy admin screen is a collection of terms. The terms on those …
answered Dec 27 '13 by Milo
1
vote
Each term has a term_id, and each has a parent. Child terms of ParentTerm A will have a parent value equal to ParentTerm A's term_id, so given the parent term's ID, you can test each term to see if th …
answered Oct 11 '13 by Milo
3
votes
The tag parameter should be the tag's slug. If you look at your tag's archive URL (the view link when editing the tag), it won't have the colon in it, because that's not a legal character in a URL. Y …
answered May 29 '17 by Milo
0
votes
Presumably you want to output term data, so you can use get_terms with the child_of argument, then iterate over returned terms and check that the parent of each term is your main term id: $parent_id …
answered Nov 20 '13 by Milo
6
votes
alter your taxonomy main query. This function would go in your theme's functions.php file, or a plugin. function wpd_adhesion_taxonomy_queries( $query ) { if ( !is_admin() && $query->is_tax …
answered Mar 4 '15 by Milo
1
vote
The third argument of add_action is the priority, or order in which functions hooked to an action will be executed. from add_action in codex: (optional) Used to specify the order in which the func …
answered Oct 19 '12 by Milo
1
vote
There are a few parts to making this work. First, we register the taxonomy: function wpa69163_register_txonomy() { register_taxonomy('board', 'post', array( 'labels' => array … ( 'name' => _x( 'Boards', 'taxonomy general name' ), ), 'rewrite' => array( 'slug' => 'board', 'with_front' => false ) )); } add_action( 'init …
answered Oct 17 '12 by Milo
2
votes
set any taxonomy parameters, those are already set on a taxonomy archive page, you just need meta key and orderby: function wpa65258_tax_meta_orderby( $query ) { if ( is_tax( 'book_style …
answered Sep 16 '12 by Milo
1
vote
$args is an array, not an object: function test( $taxonomy, $object_type, $args ) { echo $args['name']; } add_action( 'registered_taxonomy', 'test', 10, 3 ); EDIT Using the create_term action … : function my_create( $term_id, $tt_id, $taxonomy ){ $term = get_term( $term_id, $taxonomy ); echo $term->name; } add_action( 'create_term', 'my_create', 10, 3 ); …
answered May 18 '17 by Milo
0
votes
First, register a custom query var to pass the taxonomy term. We want this value to be ignored by the query, so we won't use the taxonomy's actual slug in the rule. function wpd_add_query_var …
answered Oct 17 '17 by Milo
0
votes
You can manually create pages named category and app in admin under the Pages menu, and use a custom page template for each to list out taxonomy terms or whatever you need. EDIT - 301 redirect a …
answered Dec 9 '13 by Milo
2
votes
Use get_the_terms to fetch the post's term, then use get_ancestors to get an array of that term's parent IDs. $tax = 'category'; $terms = get_the_terms( get_the_ID(), $tax ); if( $terms && ! is_wp_er …
answered Mar 24 '16 by Milo

15 30 50 per page