All Questions
729
questions
0
votes
0
answers
22
views
How to display only posts from the last day with posts published?
The goal is to show today's published posts or, if there's none, the last day's with posts published posts.
I found this old question, but the code suggested uses query_posts. I'd like to use WP_Query....
0
votes
1
answer
29
views
Splitting query results, on the frontend, into separate sections based on meta value without multiple loops?
I have a query, sorted by a meta field, and I am trying to figure out how to split the query into different sections based on the meta field. Essentially I want there to be an h2 and a ul for each ...
0
votes
1
answer
49
views
Query Multiple Post Types and Paginate Newly Created List
I know this has be asked several times but i cant seem to find the answer anywhere. My site has a resources page which is my archive for all resources (archive-resources.php).
I'm trying to also ...
0
votes
1
answer
87
views
Multiple queries and pagination
I have a homepage and an archive page where I call a template part to have a hero section for the most recent posts, and then loop through the remaining posts as usual.
Essentially I don't want to ...
0
votes
1
answer
44
views
Loop a Single Taxonomy and Output all Posts Associated (but also show a message for empty ones)
I have a custom post type for Vacancies, with a Taxonomy of Location set up. What I've achieved is looping through all Locations and then showing underneath associated posts.
Update: Thanks to @...
0
votes
0
answers
27
views
author archives, showing all custom post types, problem on pagination
Please, look at the link to the page I need support with.
This is a website where several “authors” make their reviews on books or create some original posts. This page shows “Badges” which are all ...
0
votes
1
answer
85
views
Is it possible to use the_post 2 times in one loop
I have a page on which I want to display all my posts from my custom post type, which I am able to do in a single column. However, I want to display the posts in 2 columns.
For this, I will need two ...
0
votes
1
answer
40
views
How to show correct td of table tags in wp_query loop
I Have this loop:
<?php
$post_ids_fetched = array(347, 258);
$editor = new WP_Query(
array(
'posts_per_page'=>4,
'post_type'=> 'earth',
'post__in' =&...
0
votes
1
answer
128
views
SOLVED: Shortcode to display Divi project filtered by tag in WP Query loop
I'm creating a template for a custom post type & I'm trying to add a WP Query loop displaying specific Divi projects filtered by tag. I'm inserting the loop using a shortcode, & I've ...
0
votes
1
answer
39
views
Unexpected number of loops in while
I wanted to test how many times a while would loop through a query array.
$WatchListArgs = array(
'post_type' => 'post',
'post_status' => 'publish',
'category__and' => array(...
1
vote
0
answers
44
views
Post Query with Meta Query no longer working
I am working on a magazine website that has a large amount of posts, submissions, etc. There is about 60K+ posts/submissions on the site right now. I don't know when it happened specifically, but ...
0
votes
1
answer
212
views
How do I display WooCommerce products in my query to rows of 3?
I have created a WooCommerce search plugin. It fetches products, however it only displays the products as one per row.
How can I amend my query to display 3 products per row? Here is the function:
...
0
votes
1
answer
24
views
How to get posts by a certain author in inner loop using outer loop variable or post title WordPress
I am working on a WordPress site with staff bio pages. At the bottom of the page, I would like to include their most recent blog posts (if they have any). I have an outer loop that pulls the fields ...
0
votes
0
answers
206
views
Pagination only showed when no category is set in wp_query
tldr: On my production site only, when I set category_name to any category my pagination does not show up. Once I remove category_name from my wp_query the pagination shows up (for all posts on my ...
1
vote
2
answers
223
views
How to use a conditional statement in a post loop but not count towards the "posts_per_page" if false
I have a WP_Query which has the "posts_per_page" parameter set to 12. I am then using a while loop to iterate over all of the posts and an IF statement to check whether a condition is true ...