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
- How to fix pagination for custom loops?
- Jquery Slider for profile template
- Counting the posts of a custom WordPress loop (WP_Query)?
- if ( is_home() && ! is_front_page() )
- Get excerpt using get_the_excerpt outside a loop
- How to display Yoast SEO meta description in archive template for each post instead of the_excerpt()? [closed]
- Get post content from outside the loop
- Why should I put if(have_posts()), is while(have_posts()) not enough?
- Display featured products through custom loop in woocommerce on template page
- Split Content and Gallery
- How to get Author ID outside the loop
- How can i display the content in plaintext
- Redirect loop when trying to login to /wp-admin/ [duplicate]
- How to split a loop into multiple columns
- Is it necessary to reset the query after using get_posts()?
- Is there any difference between the_title() and echo get_the_title()?
- AJAX with loop filtering categories
- Do I need to use The Loop on pages?
- Remove the Homepage Query
- remove tags from the_content
- the_title() shows title of the first post instead of the page title?
- How to force excerpts / teasers in the loop
- Retrieve each widget separately from a sidebar
- Why am I being limited to ten posts on a custom loop?
- Should I use loop in the single.php file?
- A search for ‘0’ returns results
- Why do themes rely on “The Loop”?
- How to return loop contents
- 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 get order of posts?
- Order posts by ID in the given order
- Insert image or ad script after 3 posts using the loop
- Get date of last update outside of loop
- Pagination not working on home page
- Child Pages Loop
- How to place comments_template(); outside the loop?
- Multiple Loops Homepage?
- How to Change Loop to Order Posts by Views (using wp-postviews plugin)
- How do I reorder (pop and push) items from WP_Query?
- how to upload image using wp_handle_upload
- Avoiding using a loop to access a single post
- How to get the first image gallery of a product in woocommerce in a loop
- Get post by page name or slug
- save_post + insert_post = infinite loop
- How to order posts tag by tag?
- Loop.php vs looping inside template file
- Get ID of a page containing secondary loop in content
- Custom Loop and Infinite Scroll
- Loop that displays PARENT PAGE & CHILD PAGE & outputs GRANDCHILD PAGE title and content
- is_home, and is_front_page conditional problem
- Is `query_posts` really slower than secondary query?
- Display all posts in category, with specific tag posts at top
- Are there any scenarios where the query_posts may be used?
- the_content and wp_link_pages
- Adding ‘current_post_item’ class to current post in the loop
- How do I get the attributes of a short code from a post?
- Reverse chronology of post listing
- ACF Repeater loops and resets – where is the reset_rows() documentation? [closed]
- WooCommerce Product Page Loop – Output All Product Thumbnails
- wp-admin redirecting to https, denying login
- Endless loop with wp_insert_post and wp_update_post
- Display subpages under parent page as a list within a loop
- Why is it necessary to call rewind_posts() when using the loop more than once? [duplicate]
- When to use wp_reset_postdata();
- Is including the loop necessary for page.php? [duplicate]
- the_title(); works in a page template, outside the loop. Why?
- wordpress loop for specific category
- Add 20yrs to post date, and then query
- Why do themes have `while( have_posts() )` in templates like single.php?
- When and Why is is_singular(‘my_cpt’) true while in_the_loop() is false?
- Three different post types on homepage
- What is best way passing variables to theme templates and using them different places like widgets?
- Apply styling only to first page sticky posts
- WordPress category & taxonomy loop with pagination
- Add Incrementing ID to each paragraph in the_content
- Changing behavior of the loop twice in one page