Get custom taxonomy description with paragraph tags

I am printing the description for a custom taxonomy of artists with the following code: $terms = get_the_terms( $post->ID, ‘artists’); if ( $terms ) { // loop through artists (could be multiple) foreach ( $terms as $term ) { $termid = ‘artists_’ . ($term->term_id); echo ‘<p id=”artist-bio”>’; echo $term->description; echo ‘</p>’; } } This works … Read more

All posts are still shown when adding category argument to query

I’ve got the following code in my team-type.php file which I’m using to create a custom taxonomy for a member information: function create_team_taxonomies() { $labels = array( ‘name’ => _x( ‘Kategooriad’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Kategooria’, ‘taxonomy singular name’ ), ‘search_items’ => __( ‘Otsi kategooriatest’ ), ‘all_items’ => __( ‘Kõik kategooriad’ ), … Read more

Category tree is flattened inside admin upon saving

Is there a way to avoid WordPress “flattening” the category tree when a child category is selected? This applies to both custom taxonomies and WP’s built in “category” taxonomy. To explain further, say I have the following category tree: Parent Child Grandchild Another parent Another child Another child A third parent If I then select … Read more

Query posts by custom post type and custom taxonomy

I am writing a custom loop query to filter through a custom post type and custom taxonomy. I have replaced any variables with static values for the purpose of showing you what result I want. $args = array( ‘manufacturer’ => ‘Keystone’, ‘post_type’ => ‘rv’, ‘category_name’ => ‘new’, ‘rvtype’ => ‘fifth-wheel’ ); $loop = new WP_Query($args); … Read more

Removing the “Popular Terms” area from the Taxonomy Edit Screen in the Admin Area

Personally I really dislike how wordpress shows all the “popular terms” in different sizes on the taxonomy add/edit screen in the admin area. Does anyone know of a way to either remove this entire area completely by adding code to your functions.php file and/or how to just change this specific area so that none of … Read more

Display custom post type category taxonomy

I have a custom post type and a taxonomy which allows the user to select which category the post is in. Here is my custom taxonomy: add_action( ‘init’, ‘create_talcat_taxonomy’, 0); function create_Talcat_taxonomy() { register_taxonomy ( ‘Talcat’, ‘artist’, array( ‘hierarchical’ => true, ‘label’ => ‘Categories’, ‘query_var’ => true, ‘rewrite’ => true ) ); } On my … Read more

Check if post has a specific post type

I created a custom post type called “portfolio” for posts. When navigating to a post the URL shows as www.mysite/?portfolio=some-post-title In footer.php I want to display something only if the post has the post type “portfolio”. How is this possible? I also tried different options from http://codex.wordpress.org/Conditional_Tags to no avail. 3 Answers 3 First, check … Read more