"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.

learn more… | top users | synonyms

0
votes
0answers
125 views

Letting users sort posts

I'd like to create a page for filtering posts based on a number of criteria. I can work with wp_query and deliver posts quite easily, my problem is that I can't figure out (nor can i find any answers ...
0
votes
0answers
617 views

qTranslate get content by language using wp_query

I've similar problem to the issue described here. On my bilingual website here http://redscouseworld.com/ I'd like to display posts only in Polish language. And here http://redscouseworld.com/en/ I ...
0
votes
0answers
174 views

All In One Event Calendar show event category and post category in loop

I'm using time.ly's All-in-One-Event Calendar and I'm creating a theme where I'd like to display featured items from both ai1ec events and posts in the same loop. Here's what I've tried so far: 1) ...
0
votes
0answers
128 views

Limit posts/pages in admin to user roles

I'd like to limit the posts and pages listed in the admin area to certain roles. There are plugins out there that can do some of what I need but they aren't granular enough for my needs. For example ...
0
votes
0answers
112 views

Extract video content from post to display on front page

Well I know how to extract image from post.But what about videos?I want to show first video from post . <?php $args = array( 'tax_query' => array( array( 'taxonomy' => ...
0
votes
0answers
53 views

Why did this wp_query stop working in 3.7?

The wp_query below stopped working upon an upgrade to 3.7. I rolled the site back to 3.6.2 and it's working fine. Anyone aware which code here might have changed? There's a lot going on, but briefly, ...
0
votes
0answers
56 views

Display all posts in a custom post type, grouped by a custom taxonomy term then paginate

I'm helping someone out that wants to sort their custom post type of "property" alphabetically by the value assigned in the custom taxonomy of "city" The below code works great for that: <?php ...
0
votes
0answers
255 views

Pop up showing same content on all posts display.

I have created a blog template, to show a custom posts in a grid of 3 columns. like this <ul class="grid effect-6" id="grid"> <?php ...
0
votes
0answers
60 views

How to create a custom search in wordpess matching with title and metadata

I want a custom search in wordpress where the search query should return results matching to post title or with a custom metadata. For example if a user is searching for "chicken" in my site, it ...
0
votes
0answers
74 views

WP_Query with intersection of post meta field and user meta field

On the site I'm building, each post has a serialized array of strings. Let's say post ID 1234's value for my_site_teams is array( 'Chess', 'Cheerleading', 'Football' ). Each user also has a ...
0
votes
0answers
28 views

WordPress | WP_query with multiple category starting to show with a specific category

How I can show a WP_query result posts starting to show a query by a specific taxonomy and than all the others? I have thought to a UNION in the query, but I would something with the WP_query loop. ...
0
votes
0answers
83 views

Columnizing custom post type based on custom taxonomy

my first question here, so I'll try to be thorough. I have page on which I'm trying to sort a custom post type with around 350 different artists by a custom taxonomy. The custom taxonomy is basically ...
0
votes
0answers
86 views

next_posts_link not working with custom query

I am trying to create a pagination system through my posts. Here my code: <?php $paged = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1; $args = array( 'post_type' ...
0
votes
0answers
63 views

Custom Page Pagination

Hoping someone can help me with a problem. I am using a custom page to display all posts with pagination, I noticed last night in webmaster tools that I am getting some soft 404's from the custom ...
0
votes
0answers
40 views

Custom list of categories that is sortable by count

So I am attempting to use bootstrap with wordpress. Inside my left column my design called for a large box and then 4 smaller ones below. Those boxes would hold information about a category. There ...
0
votes
0answers
71 views

Meta_query weird behaviour

I have a custom field called date_from. Dates are stored in the yymmdd format (eg 20131104). When I use a meta_query to find posts in a specific date range the query works as expected, but when I use ...
0
votes
0answers
113 views

Why is WP_Query's meta_query not filtering results?

I am working on a wordpress site that utilizes WP_Query to find songs based on their category, tags, and other things in a tax_query, but it also groups in a meta_query which (should) find songs based ...
0
votes
0answers
115 views

How to Display Custom Post Type's Gallery (images ) in Through WP_Query

I am trying to load an Image Slider images from a Custom Post Type image Gallery Feature. For example let say I have an Custom Post Type called banner which I can load images to it's Gallery and I ...
0
votes
0answers
26 views

Custom query from plugin table

I have a problem, I use booking system pro plugin can I make a query to loop post filtered by availability on booking system pro plugin table?
0
votes
0answers
130 views

Wordpress query fire inner join in one table 5 times?

Dear friends this is my arguments for WP_Query. $args = array('post_type' => 'job_listing', 'relation' => 'OR', 'meta_query' => array( 'relation' => 'OR', array( ...
0
votes
0answers
99 views

Trying to combine multiple Wordpress queries

I am trying to query multiple post types and meta values in Wordpress... the query is trying to fetch event post types with a featured meta key, as well as post post types with the featured image set. ...
0
votes
0answers
44 views

Show Child Taxonomies in Posts Dropdown

I've written a simple dropdown script and I am looking to expand it to include the child taxonomies and posts. I'm not quite sure how to accomplish checking if there are child categories for $tax_slug ...
0
votes
0answers
40 views

Query posts and return XML

Here is the short and sweet of what I am hoping to do. I would like to have a way for external websites to query mine using a game title and they would get an XML back that contains the text of the ...
0
votes
0answers
116 views

Join two wp_query

So, i have custom posts with this settings: Example 1: have meta_key "price" Example 2: have meta_key "no_price" So, i want to list this posts ordered by "price". I just want to join these two wp ...
0
votes
0answers
35 views

WP Query Wordpress Post Type with the same Taxonomy name

This is what I have: Custom Post type "Books" with Taxononies/Categories "Genre" and "Author" Another Custom Post Type "Authors" which have all author pictures and bios. This is what I want to do: ...
0
votes
0answers
62 views

Update Post with Modified Data

Task is to take class from <pre class="php"></pre>, and add that class to <code></code> and wrap all content of <pre> into <code> after that. I am querying WP with ...
0
votes
0answers
38 views

Link to custom WP_Query page

Is it possible to get link to the page which display all posts from the custom WP_Query class? I have tried http://domain.com?post_type=post&сat=5&tag=discount and for some parameters it ...
0
votes
0answers
21 views

How to retrieve parent pages

I have this pages and all are parent of Media: Behind-The-Scenes: Commercial "I KNEW YOU" BEHIND-THE-SCENES RED Album Art 2012 - Rio de Janeiro, Brazil SPEAK NOW EXHIBIT 2012 Australia/New Zealand ...
0
votes
0answers
12 views

How to show specific tagged posts and ordered by future date on the homepage

I'm creating a site that has upcoming shows on the homepage. I would like the future shows that are up next to show on the home page. I have created a custom field on the posts called "show_date" with ...
0
votes
0answers
65 views

Custom Post Types and Rewrites

I have a custom post type registered using Custom Post Types UI plug-in. It has a rewrite rule: rewrite' => array('slug' => 'apps/iphone-ipad', 'with_front' => '1'), I am using a custom ...
0
votes
0answers
71 views

Course listing with multiple dates

I'm trying to build a course listing (custom post type) - each course has multiple dates assigned to it, but I'm failing miserably (mainly due to my poor PHP skills!). I'm trying to use standard ...
0
votes
0answers
38 views

Change output of the function

Below is the Current Function function ajax_result($arg, $id,$pagenumber){ $apiclass = new ajaxwpqsfclass(); // The Query $query = new WP_Query( $arg ); $html =''; // The Loop ...
0
votes
0answers
208 views

Converting an existing query_posts to WP_Query

I am having trouble trying to convert my query_posts loop that is bugging out to a WP_Query, was hoping someone may have some luck looking at it: This is my old loop: <article ...
0
votes
0answers
74 views

Build Categories List for Posts with specific meta_value

I've a set of Posts under custom post type that has a specific custom field (meta_value). This posts are categorized with a simple Common Parent->Child#N relationship. The question is how to list ...
0
votes
0answers
214 views

loop through custom post types with meta data

I'm really curious as to how might be the quickest way to loop through a custom post type with meta data. I have some code that works but it's slow. I'm using wp_query and it works. I have also a ...
0
votes
0answers
104 views

WPML conflicting with content creation via XML RPC

I am creating new posts in WP via an app written in Obc-C. The app pulls my iOS app reviews via JSON and creates posts and categories programmaticaly. Creation of posts and categories works great, ...
0
votes
0answers
49 views

Query a range of pages by menu_order

I'm trying to figure out how to do the following type of query: I want to return up to 12 posts (0 thru 11) by page/menu_order. If there are more than 12 posts, but only 5 pages have an order assigned ...
0
votes
0answers
105 views

How to order query by numeric meta value?

I cannot order my query by meta value by numbers, and ordering by post order does not work too. This is my code: <?php $args = array( 'posts_per_page' => '-1', 'post_type' => ...
0
votes
0answers
218 views

Passing multiple variables in wp_rewrite / wp_query

i need to be able to append a custom url for my page in wordpress so far i can get it to return the first query var, but i cannot get it to return the second or third im at a loss of what to try next, ...
0
votes
0answers
26 views

General Guidance on how to delay validation of user profile custome field

I have a concept that want to apply to my Wordpress Theme. I want to add a costume field to registration form (easy, ok) the field can be filled later in profile, but must be field in 30 days, ...
0
votes
0answers
106 views

show/hide attachments

Is there a way to show/hide attachments in my case images on a post. What I want is to mark an image as "hidden" and then only show it to the admin and hide hidden images from a normal user I know ...
0
votes
0answers
72 views

tag_slug__and not working as expected

I am trying to fetch all posts which has been tagged with particulars tags.here is code i am trying to use $args=array( 'tag_slug__and' => $categories_array, 'posts_per_page'=>10, // ...
0
votes
0answers
129 views

query by meta value then date and not empty meta value

So i have a query like this function filter_where( $where = '' ) { // posts in the last 7 days $where .= " AND post_date > '" . date('Y-m-d', strtotime('-3 ...
0
votes
0answers
87 views

Orderby comment_count ignored if multiple orderby values

I'm trying to order my archive page by comment_count then title. add_action( 'pre_get_posts', 'my_change_sort_order'); function my_change_sort_order($query) { if (is_archive()) { ...
0
votes
0answers
49 views

Wordpress can only query up to 766

Basically, I am little unaware of my WP can only run a query up to 766 custom post of one type (the actual posts). I have 26,000 posts that are within one custom post type, but cannot query them all ...
0
votes
0answers
83 views

Can't get pagination to work

I'm trying to create pagination on a blog post page where one page displays 13 blog posts and then displays some links to go to another page. Now just to get it working, I'm using this code: <?php ...
0
votes
0answers
99 views

Displaying posts from last 24 hours in current category with pagination

I am trying to find a solution for this problem but unfortunately without any success. I've checked WordPress Codex (WP_Query & wpdb) and few other solutions from Internet and still I wasn't even ...
0
votes
0answers
76 views

WP_Query retrieve custom posts but not the post showing

I am developing a custom post type which shows releated posts which are within the category which is working perfect but I cant seem to get the right query to make it not show the current post which ...
0
votes
0answers
32 views

Why I getting only 1 post?

I'm using the following basic code: <?php get_header(); ?> <?php $args = array( 'status' => 'publish', 'post_type' => 'radio', 'orderby' => 'date', 'order' ...
0
votes
0answers
249 views

Displaying database data as pages (or similar)

I have a friend that has a big database of cars (lets say 4000 entries). Now he wants to add this info to his website. Initially I played with the idea of creating a page for each car, but this ends ...