"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
244 views

Get Recent Posts by Date in Multisite

Everything in explanation is about CDTuts I've created a WordPress Network and I want is to get the recent posts from all of the selected subdomain blogs. I need to get the latest All organized by ...
0
votes
0answers
11 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
58 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
59 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
33 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
183 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
67 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
168 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
70 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
35 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
90 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
142 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
23 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
88 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
55 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
108 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
76 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
167 views

WP + woocommerce search with specific attribute

I have a problem. When I am adding a product in php code I need to check first if the product with the same code does not exists. I am using attribute in woocommerce and set new attribute code. In DB ...
0
votes
0answers
28 views

Apply operators AND or OR while passing taxonomy query vars in form multi select dropdown

I want to add taxonomy query vars to a post type archive like so: http://www.mydomain.com/?taxonomy_a=term1,term2&taxonomy_b=term1+term2 how do I control operators in query vars if I use multi ...
0
votes
0answers
25 views

Search by child posts parameters, results as parent post

Let me give you a quick abstract explanation of what I need: 'Cars' is custom post type. Each car has a user associated with it (by custom field). Each user might have more than one car. Visitors are ...
0
votes
0answers
54 views

Organize Custom Post Types by multiple Custom Taxonomies

I'm trying to sort a list of publications by type, year and month. I have my query looking first into the "type" custom taxonomy called "document" to list the different publication types. But after ...
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
224 views

Using a query to display custom post types based on ACF post_object

Basically the set up I currently have is two sets of custom post types which are: uc_university and uc_course I'm having lots of trouble trying to display a course based on a my Advanced Custom ...
0
votes
0answers
23 views

User's posts page site.com/post-list/username

How can I make template for user's posts? For example like: site.com/post-list/username How to make query to get username from URL and transfer it to the post-list.php template? Like author.php ...
0
votes
0answers
626 views

Query custom taxonomy term to display child terms & posts associated with term but exclude parent term

I've created a custom page-template to pull a custom post types (education) custom taxonomy (animals). What I'm trying to do is display all child posts + term (set as h2) inside the term ...
0
votes
0answers
267 views

wp_query orderby random do not repeat infinite scroll - one loop

I have found a lot of documentation on solving this issue with multiple loops, I'm finding it hard to see a solution for one custom loop. Problem: I'm using infinite scroll to load in the next page ...
0
votes
0answers
72 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
88 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
59 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
30 views

One WP_Query is causing thousands of queries?

I threw a get_num_queries() before and after the following, and the # increased by 1983 queries. What? $projectsQuery = new WP_Query( array( 'posts_per_page' => -1, ...
0
votes
0answers
61 views

Sort Custom Post Type entries by 2 custom meta fields

I'm trying to create a page to display publications by year and date. The issue I am running across is that I can sort by only one of my custom meta fields. I have a custom post type called ...
0
votes
0answers
7 views

When the length calculator is active the quantity field should be hidden

I want When the length calculator box is active the quantity field should be hidden on product details page in woocommerce and theme is shofique theme of themeforest. Any suggestion ? Thanks In ...
0
votes
0answers
34 views

Archive by custom date

I've got a modified version of get_calendar() to use a custom date field to display events by the date they are happening rather than using the post_date. Clicking on a date on the calendar brings you ...
0
votes
0answers
31 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
40 views

Dynamic Custom Tax Archive Page?

Is it possible to have a page that dynamically shows a range of categories/custom taxonomies along with their posts? Category 1 - Post from above cat - Post from above cat - Post from above cat ...
0
votes
0answers
33 views

Display posts from custom post type organised by taxonomy term

Is there a way that I can list all the posts within a custom post type organised by their custom taxonomy term? For example; I have 9 posts in a custom post type custom_post, separated into 3 terms ...
0
votes
0answers
124 views

Parsing JSON response in WP from non-WP site to load a post based on a returned ID

I have a Wordpress site that will be pushing remote calls to a non Wordpress application (one that is making predictive decisions). The system my WP site is talking to will then return a post id to ...
0
votes
0answers
69 views

Query/Loop multiple taxonomies in taxonomy template

How to Query multiple taxonomies in taxonomy template, ex. taxonomy-schools.php Please help, Ihave spend many hours trying to fix this.. Here's my code: <?php $term =$wp_query->queried_object; ...
0
votes
0answers
185 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 ...
0
votes
0answers
81 views

nesting a loop with sticky posts?

I am trying to retrieve two types of posts composing a total of 5 posts on the first page of a site the first post is styled differently to the following 4 posts (to maintain a sense of clarity let's ...
0
votes
0answers
80 views

Ordering Custom WP_Query loop by meta key value with pagination

I am trying to Order custom post type results by a meta_key value with pagination. The pagination is working fine and I suspect I can't use the same $args that I am using with my new WP_Query in my ...
0
votes
0answers
66 views

gdstar and WP_Query problem

I read a few topics like this: Why is that gdsr_sort=thumbs (GD start rating plugin) only works with query_posts and not with WP_Query? but still got the problem with this, got custom new WP_Query ...
0
votes
0answers
115 views

How to create dynamic menu from HTML

I tried creating a dynamic menu from HTML, I registered menu in function name is main menu, Here is the HTML code that display the main menu- <div class="submenu"> <div ...
0
votes
0answers
66 views

Permalinks with Virtual Pages

I am attempting to make a custom login page template (page-login.php) that will be loaded whenever the user navigates to any of the following URLs: www.url.com/login ...
0
votes
0answers
129 views

Cannot invoke wordpress's API from outside existing PHP system

I have an existing PHP site located on /var/www/A, now I want to add a blog module on /var/www/A/wordpress. I have installed wordpress below /var/www/A successfully. I can visit it via ...
0
votes
0answers
53 views

Read more redirection problem

I have tried <?global $more; $more = 0;?> On pages and read more link shows but the full content is not shown. If I click read more it remains on same page. Logically I'm supposed to taken ...
0
votes
0answers
73 views

Order custom fields by string length

I am trying to reorder a custom field from one of my Custom Post Types. I'd like to get the custom field string which is called 'first name' and order all of the first names by their string length. ...
0
votes
0answers
39 views

Use global query parameters in new WP_Query for presenting separate results in tag archive

wp_reset_postdata() does not seem to work here. I'm building a custom tag archive template, which should feature results from different post types in diferent boxes. <?php $query_stringa= ...
0
votes
0answers
48 views

differentiate result in parent and child custom taxonomy in wp-query

I am using wp-query for filtering results on the basis of tax_query. e.g. $args = array( 'post_type' => 'product', 'relation' => 'AND', ...
0
votes
0answers
98 views

Marginal pagination on home.php

I'm trying too make a custom wp-theme and use a few loops in home.php. But now I can't finish home.php because of pagination. How cant I realize any type of pagination with saving that kind of ...