How to get top rated posts using wp query?

Don’t worry. I have found solution for your issue. you can use below code to display 5 top rated posts based on average rating. i have created below function to get top average rated post using sql queries and wp_query functions. here is updated function for all custom post type. function top_rated_post_via_comment_of_CPT($post_per_page = 5){ global … Read more

Force to show all fields in comment forms to the logged-in users

you can paste the code below in your theme functions.php file, it should generate almost the same comment form for logged in and logged out users add_filter( “comment_form_fields”, function( $comment_fields ) { if( is_user_logged_in() ) { // Get an array of field names, excluding the textarea $comment_field_keys = array_diff( array_keys( $comment_fields ), array( ‘comment’ ) … Read more

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