Tagged Questions

"wp-query" ambiguously refers to one of two things. 1) WP_Query is a class native to Wordpress which allows users to query the posts database using a number of criteria. 2) $wp_query is the default object that holds the main query object on each WordPress page.

I am using https://wordpress.org/plugins/wp-pagenavi/ pagination and because of certain reason I have "blog pages show at most" set to 100 and i can't reduce it.
I have total 30 posts in a category. ...

I am learning WP_query and recently ran into a problem.
I need to do a query where i first filter trough one or more custom fields, which works great thanks to meta_query.
However, i also need it to ...

I'm going nuts.
All I have is a simple loop on the home page of the site (which is a static page), and it should show the most recent (1) post of a certain category. The trouble is no matter what i ...

I'm trying to build a WP_Query with specific filters, i.e., checkboxes and radio buttons.
The checkboxes will filter the meta-data linked with my custom post type. The meta-data is the location. And ...

I need that the main page of my site have 3 columns:
- The first having the 5 most viewed posts;
- The second with the next 5 most viewed posts;
- The third with the most recent posts.
I don't want ...

I need to display max 5 latest sticky posts that have a thumbnail. And I need to have accurate counting of the displayed posts. I've tried to exclude sticky posts without a thumbnail with meta_query, ...

I have a number of regular posts and pages in a regular category called "Featured". I have also installed a plugin called "Event Organizer" that creates its own custom post type called "Event" and has ...

I'm working on a tabbed archive page for taxonomy terms.
Ultimately, I want each tab to show the 10 most recent posts for an individual post type with a "see all" link at the bottom of the tab that ...

All I'm trying to do here is a simple custom loop using WP_Query to display posts if they are published in the last 24 hours; otherwise, a message appears telling the user to check back soon for fresh ...

I am using meta_value_num to output a list of items in order by a custom field. The custom field value that is being passed is 1, 2 ,3 or 4. The order works for the first 7 items but after that they ...

I have a following search.php page (this is just the code required for problem presentation).
Why is my $total_results returning a number of posts found, but when I do a loop though it always print ...

I've been tasked with creating a portfolio website for a client who also wants a blog.
What I've Done Thus Far:
I’ve created a custom post type to separate the portfolio work from the blog posts and ...

I'm working on the update for a website which wasn't originally developed by me.
The task is to have a table on a main page and, if you move a slider with value on it (100, 200, ... 1000), the table ...

On the home page of my site I have a series of tiles that link to various parts of the site. One tile links to the blog and I have written some code to pull the latest post with an image attached to ...