Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

query-posts

WP query_posts group by meta field related

WP query_posts group by meta field related

Categories custom-post-types Tags custom-field, custom-post-types, query-posts, wp-query

Query post and sort by custom value calculated with custom field on cpt

Query post and sort by custom value calculated with custom field on cpt

Categories wp-query Tags query-posts, wp-query

Custom Query: Multiple CPTs and a taxonomy filter

Custom Query: Multiple CPTs and a taxonomy filter

Categories custom-post-types Tags custom-post-types, query-posts, tax-query, wp-query

Elementor posts custom query based on tag [closed]

Elementor posts custom query based on tag [closed]

Categories wp-query Tags actions, hooks, pre-get-posts, query-posts, wp-query

Optimising WP_Query with ACF Fields

Optimising WP_Query with ACF Fields

Categories wp-query Tags advanced-custom-fields, optimization, query-posts, wp-query

How to detect if the ajax_query_attachments_args was triggered to set the featured image?

How to detect if the ajax_query_attachments_args was triggered to set the featured image?

Categories ajax Tags ajax, post-thumbnails, query-posts

Create a Loop with Posts Ordered by Most Recent Comments

I wouldn’t use query_posts(). That particular function is meant for making changes to a specific query … and it’s limited enough that you can’t get the kind of custom functionality you need out of it. Rather, I’d use a custom query. What you’ll want to do is query approved comments sorted by their post/approval date … Read more

Categories query-posts Tags loop, query-posts

wordpress query_posts featured page always on top

In your query posts array add this: ‘meta_key’ => (meta key name in database), ‘meta_value’ => 1 To make it at the top use two queries. One for the top first post and one for the rest of the posts/pages. so your whole query will look like this: <?php query_posts(array(‘showposts’ => 1, ‘post_parent’ => $post->ID, … Read more

Categories query-posts Tags query-posts, sticky-post

query_posts meta_key with current date

meta_key value should be name of custom field. I doubt you have fields named after each month, so it’s likely should be eventdate. meta_compare should have value that specifies a comparison operator, or just be omitted and it will default to = in that case. From this you can’t really query full event date on … Read more

Categories customization Tags customization, mysql, query-posts

simple fields plugin custom query

Well, way late, but I found this looking for the answer myself before solving it, so I’ll post for others in my boat, as I’m sure the OP sorted this by now. 😉 Use “meta_key” and “meta_value” in your query after taking a look at “post_meta” in your database to figure out what the simple … Read more

Categories custom-field Tags custom-field, php, plugin-simple-fields, query-posts
Older posts
Newer posts
← Previous Page1 … Page36 Page37 Page38 … Page128 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Post Navigation Elementor
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • WPFacet multiple loop displaying duplicate content
  • Get the name of the template/*html file used
  • Fix: WordPress.DB.PreparedSQL.NotPrepared Plugin Check (PCP)
  • Removing unnecessary CSS and JS code from wp_head()
  • hexagonal image gallery. Am I on the right track? [closed]
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress