How does WP generate the default $query in WP_Query based on the URL?
I understand the mechanisms of creating a custom query by instantiating a new WP_Query object when I need granular control of what posts … Read more
I understand the mechanisms of creating a custom query by instantiating a new WP_Query object when I need granular control of what posts … Read more
WordPress version: 5.4.1 I’ve built a plugin that includes a shortcode. The shortcode shows a product listing and has a couple of filters. … Read more
but it just shows the first post, I need to show three posts, please help me $the_query = new WP_Query(array( ‘p’ => ‘272 … Read more
I am writing some PHP which allows users of my site to submit a form and query posts by their post_meta. Everything works … Read more
I am using $wpdb to do a mysql query and get the data from a php file. $results = $wpdb->get_results(“SELECT * FROM table_name”); … Read more
I want to display all posts starting from a certain offset, my query is: WP_Query( array( ‘posts_per_page’ => -1, ‘offset’ => 20, ‘cat’ … Read more
My goal here is to query posts by a meta_key, with the values falling in between 1-100. When pulled, it is suppose to … Read more
I’m trying to figure out the best way to go about this and I have part of my solution, but I can’t figure … Read more
I am iterating through an array of post IDs $ids. All is displayed correctly except for the authors. Every post shows the same … Read more
I have a draft post with the author set to 5. User #5 is trying to view that draft on the front end … Read more