You could change the query.orderBy
parameter of the query block (as long as query.inherit
is not true
). This parameter corresponds to the orderby
query var. For number of comments, you’d use the comments_count
value, as per the `WP_Query::parse_query documentation.
To add this value, you’d need to be in the code editor (not visual editor) of the block editor and have these as in the block comment opener for the core/query
block:
<!-- wp:query {"query":{ … "orderBy":"comment_count", … "inherit":false}, … } -->
Related Posts:
- How can I custom order the results from wp_list_categories?
- Sorting Woocommerce products with numeric titles [closed]
- wordpress change the loop order by dynamic value
- How to order posts by meta_value created inside loop?
- How to get_posts where ‘menu_order’ is more than 0/zero?
- How can I make the loop not count special post formats towards the post count?
- Apply an Incremental Counter in an Array Function
- How do I display an image before the first post of the loop when I’m using get_template_part?
- Problem with displaying HTML content after in_array [closed]
- Add “showing posts x to x of y” in custom post type paginated loop
- How to check if a product is purchased within the last 365 days before displaying something
- Give each posts in a loop a number in sequence
- Count post views in loop
- Loop is crazy – one row displays wrong count of posts [closed]
- Ascending order has strange effects on wordpress loop
- Loop order issue with Ajax filter
- php loop error for count posts in category
- Loop random posts and display odd and even based on two alternating meta values?
- WordPress redundant posts based on meta field
- Custom Looping of WordPress Posts
- Link Button url count php and wordpress
- WordPress Not Sorting By Custom Field
- How to use orderby on meta_value when using Pods custom database table storage
- Counting the posts of a custom WordPress loop (WP_Query)?
- Get post content from outside the loop
- Is there any difference between the_title() and echo get_the_title()?
- Using the Loop to show all levels of subpages under a parent page? Halfway there
- Cleanest Way to Select Every Second Element in a Loop?
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Are there any scenarios where the query_posts may be used?
- Display subpages under parent page as a list within a loop
- When to use wp_reset_postdata();
- Why do themes have `while( have_posts() )` in templates like single.php?
- Count singular post views automatically
- Related Posts loop – offset
- Too many nested wp_query loops in this hypothetical query?
- Showing current subcategory
- Display date only once for a each set of posts relating to that date
- WordPress Loop – Style rows of posts differently
- Generating dynamic Tabs with multiple query post loop
- How do I override part of the main loop in my child theme?
- Chopping up a large ajax request of around 200 posts [closed]
- Combining the_excerpt with the_content
- How to get an array of years from all of the search results, and use it to filter by year the paginated loop?
- Only display videos and images in the_content() within loop
- Get search.php results in header.php?
- Recent posts on a static home page
- Query last updated posts (posts updated in the last 24 hours)
- I write simple wordpress loop for taxonomy.php file but don’t show result
- Publish Categories for a particular Author on a given Post
- How to hook into container
- Exclude first post (sticky or not) from the loop using query_posts()
- How to add a specific div element to the first post in a row?
- Need to add class to first element in a foreach loop
- Scrolling Posts with Ajax
- Sort posts by first letter in the title, not by first number
- Post loop count is not in order
- What PHP Needed to Make One Loop with Multiple Styling?
- Simple foreach loop help needed in wordpress “the loop”
- Get paged outside of loop?
- Show scheduled posts in loop (but don’t link to them)?
- How to get a count of all posts in foreach loop and split into fourths
- How to loop through yoast primary categories? [closed]
- WordPress get post thumbnail url
- Blank content php code not parsing advanced custom fields gallery add-on [closed]
- Three Column Loop
- Split loop into columns
- get_posts() forcing ignore sticky posts on main loop
- display post tags on single.php inside loop
- Custom content before post content
- Can’t get the previous and next posts permalink
- make diffrent template on last six post published
- Modifying a Loop to Show More
- Does search.php autofilter The Loop?
- How to check all items in a loop have post thumbnail?
- Page Navigation Outside the Loop
- How to make the following loop break/stop when it reaches 2 posts (custom post types called Topics)?
- How to display post tag on each post? [closed]
- ACF: display custom filed of CPT into the loop
- Solved – Inserting content inside the WordPress loop
- Add Search and Filter functionality to custom loop
- How to add “NEW” badge on latest posts or published 3 days interval
- For each 3 posts, show a different post type
- Show posts by tags excluding current post
- Adding options to loop
- Featured posts and the loop
- How to fix pagination for custom loops?
- Custom Post Type Order Index Loop
- Display latest posts using WP Loop with different size divs
- Combining external feed into post loop
- Please help me to win the battle with 2 column loop by category
- Display content from “About Us” page on the Home Page
- How to use add_action(“wpcf7_before_send_mail” outside wp loop?
- Applying a filter to multiple loops for days ago
- repeating posts on 2nd page to posts
- Limitless amount of posts in custom archive page
- Two loops in CPT archive page, exclude posts from main query
- Count the number of matching post names in foreach loop