Using 1 taxonomy for multiple post types?

You can use an array of post types in register_taxonomy() $object_type (array/string) (required) Name of the object type for the taxonomy object. Object-types can be built-in Post Type or any Custom Post Type that may be registered. http://codex.wordpress.org/Function_Reference/register_taxonomy Example: register_taxonomy( ‘artist’, array( ‘profile’, ‘cd’ ), $args );

Remove quick edit for custom post type

Check out the builk actions page in the codex. I believe the proper action to unset is inline. This will remove the “Edit” bulk action, which is actually quick edit. <?php function remove_bulk_actions( $actions ){ unset( $actions[‘inline’] ); return $actions; } add_filter(‘bulk_actions-custom_post_type_slug’,’remove_bulk_actions’); ?> As for the Quick edit in each row, look into manage_{$post_type}_columns, as … Read more

Taxonomy + post_type

Don’t know how did you set the post type and the taxonomy, but by default I think you’re supposed to see all quotes from an author through myblogname.com/the-author-name. If you want to place static words such auteur or citation in the link, then this is related to how you set the options for creating the … Read more

Exclude custom taxonomy from search results and archive pages

Copy the following snippet and paste it into the code of your theme, preferably in the functions.php file: /* Exclude a Category from Search Results */ add_filter( ‘pre_get_posts’ , ‘search_exc_cats’ ); function search_exc_cats( $query ) { if( $query->is_admin ) return $query; if( $query->is_search ) { $query->set( ‘category__not_in’ , array( 30 ) ); // Cat ID … Read more

get_terms() How many is TOO many?

Ad slowing down) Lame answer: depends on your server and stuff. Ad possible bug) wp_count_terms(); is a level “above” get_terms(); and therefore has values like ‘hide_empty’ and ‘fields’ already set. I’d say: diff your $args against those predefinied by wp_count_term();. The later function does nothing than calling the get_terms() at it’s end.

Get total number of comments from posts in a specific custom taxonomy

You’ll need to loop through your posts, use get_comments_number() to get the number of comments for each post, and then accumulate the total number of comments in a separate variable. e.g.: <?php $features_comment_count = 0; if ( have_posts() ) : while ( have_posts() ) : the_post(); $features_comment_count += get_comments_number(); endwhile; endif; ?> (I’ll assume that … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)