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

List all ACF field values across every post on one page

You want to start here and here. Essentially you’re just looping through all your posts like normal and then adding some custom fields into it. Be sure to reference the Repeater Field documentation. This should work inside a loop. Notice you’ll need your post ID. <ul> <?php if( have_rows(‘YOURREPEATERFIELDNAMEHERE’, ‘POSTIDHERE’) ): while ( have_rows(‘YOURREPEATERFIELDNAMEHERE’, ‘POSTIDHERE’) … Read more

How to merge these two post queries?

The answer is “take the array from the tax_query argument in the first query, insert it into the second and change the relation to OR”. In other words, to use a single query with the following in the arguments … (As stated before, $terms_list_ids was already generated; it contains the IDs of Company terms which … Read more