finding out the top 5 source ( source is a custom taxonomy ), in a given category

Thanks to some leads from the wp-hackers list on this very question and some googling around, here is the answer to my problem $sql = “SELECT count(*) as count,terms2.name as tag FROM wp_posts as p1 LEFT JOIN wp_term_relationships as r1 ON p1.ID = r1.object_ID LEFT JOIN wp_term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id LEFT JOIN … Read more

Paginate WordPress Category Pages

paged is correct unless you’re using pretty permalinks, however, if you’re just trying to alter posts per page for categories, you should be using the pre_get_posts action, there’s no reason to use query_posts in the template: function wpa85791_category_posts_per_page( $query ) { if ( $query->is_category() && $query->is_main_query() ) $query->set( ‘posts_per_page’, 2 ); } add_action( ‘pre_get_posts’, ‘wpa85791_category_posts_per_page’ … Read more

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