Average Score of all ratings in comments

add this code into your plugin file to register activation hook // register activation hook register_activation_hook( __FILE__, ‘my_rating_plugin_activation’ ); now create a function and add your table creation code into function my_rating_plugin_activation() { global $wpdb, $rating_table_name; if($wpdb->get_var(“SHOW TABLES LIKE \”$rating_table_name\””) != $rating_table_name) { $wpdb->query(“CREATE TABLE IF NOT EXISTS $rating_table_name ( rating_id int(11) NOT NULL AUTO_INCREMENT, … Read more

Thumb rating for wordpress – top user

there are varaiables in gd rating to sort query. you can use in URL like : http://www.gdstarrating.com/?gdsr_sort=rating&gdsr_order=desc http://www.gdstarrating.com/?gdsr_sort=review&gdsr_order=desc http://www.gdstarrating.com/category/tutorials/?gdsr_sort=votes&gdsr_order=asc or pass to a query query_posts(“gdsr_sort=rating”); query_posts(“gdsr_sort=review&sort_order=asc”); query_posts(“gdsr_sort=rating&gdsr_multi=3”); query_posts(“gdsr_sort=votes&sort_order=asc&gdsr_multi=3”); you can find more info here : http://www.gdstarrating.com/2009/07/03/how-to-reorder-posts/

Author page: Comments and Ratings?

just to add to what Rarst answered, you can create Custom Post Type not to emulate Comments but as stub posts with no ui. then to every Author on your site add a custom user metadata that will hold a post id of your newly made post type (one per each author) and in your … Read more

Get rating product by product id

Given a product ID you can get the average rating like this: $product = wc_get_product( $product_id ); $rating = $product->get_average_rating(); That’ll return the raw number (4.00, 3.50 etc.). To output the rating HTML for a given product you can use this code: $product = wc_get_product( $product_id ); $rating = $product->get_average_rating(); $count = $product->get_rating_count(); echo wc_get_rating_html( … Read more

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