Skip to main content
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
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
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 not deleted user 6035

Since WordPress 2.3, plugin and theme authors have had the ability to create custom taxonomies-- essentially specialized "categories"-- to help organize information.

21 votes
Accepted

Theme localization of "slugs" (custom post types, taxonomies)

I wouldn't try to localize your slugs. Instead, why not give your users the option to change them by adding another field to the permalink settings page? Hook into load-options-permalink.php and set …
chrisguitarguy's user avatar
10 votes
Accepted

get_term_by not working when in functions.php

This is probably happening because the taxonomy you're trying to query is registered yet. Eg. The WordPress environment is loaded when a theme's functions.php file loads, but many plugins/themes/core …
chrisguitarguy's user avatar
6 votes

I don't need 'view' page for my custom taxonomy

If you just want to "turn off" the public facing part of a taxonomy (eg. just use it for grouping), you can do that when you register it. Just set the query_var argument to false and WordPress will n …
chrisguitarguy's user avatar
5 votes

How do I create multiple post types in same menu section in WP-admin?

WordPress let's you define where a post type appears in the args where you register it. It's the show_in_menu argument. You can set it to true, false or a the slug (a string) of the page under which …
chrisguitarguy's user avatar
3 votes
Accepted

How do I display a list showing custom post types nested within a taxonomy?

Okay, so first off, I would rename your video category to something like video_category so it doens't conflict with the built in category. That said, the easiest way I could think to demonstrate this …
chrisguitarguy's user avatar
3 votes

Displaying Multiple Post types in Taxonomy

Hook into pre_get_posts, check for the taxonomy, and set all four post types as the post_type parameter of the query object. Check out the Type Parameters section on the WP_Query docs for more informa …
chrisguitarguy's user avatar
2 votes

Displaying tags associated with posts in Custom Post Type

You want to look into the_terms or its big brother get_the_terms. It's how you display custom taxonomies on the front end -- similar to the_category or the_tags. Example: <?php // somewhere in a tem …
chrisguitarguy's user avatar
2 votes

How to get custom category's link?

As the other's mentioned, wp_list_categories will work if you you want to do a list of things (just like wp_list_pages does for pages). If you specifically want the link (URL), you can use get_term_l …
chrisguitarguy's user avatar
1 vote

Order custom posts by taxonomy, then by meta_key

So, first off, I would use get_posts instead of writing your own query. The strategy: fetch all the posts at once, then filter them using a callback or foreach loops. What follows is a PHP 5.3+ examp …
chrisguitarguy's user avatar
1 vote

Insert taxonomy slug into loop class

I would not use query_posts and instead use post_class and a new WP_Query object. to insert the taxonomy slugs. This is more "future proof" and you can put it in a plugin to keep the same functionali …
chrisguitarguy's user avatar
1 vote

Help on Custom Post Types

You want Posts 2 Posts which allows you to create many to many (or one to many or many to one) relationships between post objects -- including custom post types. To related stores and deals you might …
chrisguitarguy's user avatar
0 votes

Sort taxonomy page alphabetically by meta rather than default post date

Pretty much the same as the above to answers, but using meta_query instead of meta_key. meta_key was deprecated as of WP 3.1. I'm not sure if ordering by meta_value still works in this case, however. …
chrisguitarguy's user avatar
0 votes

Conditional display for custom fields/taxonomy

Use get_the_terms. It will either return an empty array, a WP_Error object, or the terms. So you can check it they exist. <?php $terms = get_the_terms( $post->ID, 'promotion' ); if( $terms && ! is_ …
chrisguitarguy's user avatar
0 votes

How to remove "Taxonomy name:" from wp_title

I'd recommend you use a SEO plugin to take control of all of your titles. WordPress SEO by Yoast is very good. Or you could add a filter to wp_title to change the output. <?php add_filter( 'wp_tit …
chrisguitarguy's user avatar
0 votes
Accepted

How do i change the tags and taxonomies

You can set your tag base differently in the admin area: Settings > Permalinks then at the bottom there is a field for "Tag Base". Enter "celebrities" in that field and your tag pages will be yoursit …
chrisguitarguy's user avatar