Order a query result by a numeric meta key even if it does not exist, but put the posts with meta key first

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com

I want to order a WP Query result by a numeric meta value in PHP.

To achieve this, I am doing as follows:

Where the meta key is called orden_en_categ.

And what is the problem?

This query setting is displaying posts in the following order:

I want the posts without meta appear after the posts with meta, as follows:

Where the order of the posts without meta does not matter.

The default meta solution:

I know I could add a default meta to all posts with a value of something like 999 and this would work. But, there must be an alternative way, without having to add those sticky meta values.

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com