Software Engineering in Web Development, Backend Services, and More

Search: “wp_query” (Page 1 of 29)

We found 145 results for your search.

How To Setup Custom Queries For WP_Query Pagination

[…] expected. Ultimately, it required me passing a little bit more information to the query’s arguments array and to the pagination link functions. Here’s how you can setup WP_Query Pagination to work properly in custom queries. A Few Assumptions There are two assumptions that I’m making about your setup: You’re using pretty permalinks. That is, […]

Writing Clean, Maintainable Custom WordPress Queries

[…] Query for the 10 most recent posts by the specified users $args = array( ‘post_type’ => ‘post’, ‘posts_per_page’ => 10, ‘author’ => $featured_user_ids ); $the_query = new WP_Query( $args ); // Finally, loop through the posts while ( $the_query->have_posts() ) { $the_query->the_post(); /* Snipped for brevity, but this is where the markup would render […]

« Older posts

© 2026 Tom McFarlin

Theme by Anders NorenUp ↑