Set up The Loop with query parameters. This will override the current WordPress Loop and shouldn’t be used more than once. This must not be used within the WordPress Loop.

learn more… | top users | synonyms

2
votes
0answers
54 views

Keep featured content post in homepage with original order

I'm searching how to keep the featured post in my blog homepage without excluding it from query post. My blog uses the Twenty Fourteen theme. I found this solution. Open the featured-content.php ...
2
votes
0answers
152 views

Display a query with multiple post types and same relationship on a single page

I am creating a client portal were my clients can maintain their projects and leave feedback in Wordpress. I have two custom post types called "Clients" and "Projects" and they each pull information ...
2
votes
0answers
1k views

query_posts with a custom post type, a meta_query and sorting by post date?

I've searched the archives and found questions similar to what I need, but haven't found exactly what I want. I've got a bunch of products that are sorted by a meta_key of country, and I'd like to be ...
1
vote
0answers
13 views

Wordpress tax_query not showing private posts

When querying posts with the following: $getClientsArgs = array( 'post_type' => 'client', 'showposts' => -1 ); query_posts($getClientsArgs); Private posts are displayed if the person ...
1
vote
0answers
83 views

BBPress Search results in Wordpress search

I want to display in Wordpress search results page - 10 or less found results from BBPress (plugin) forums. I know that BBPress use custom post types (forum, topic, reply) but I don't know how to do ...
1
vote
0answers
92 views

How to increase load time of an archive/search page (WP_Query)

I'm currently looking at why the archive and search pages take so long to use, and have found that the bulk of processing time is spent on the query_posts that is called before the template has even ...
1
vote
0answers
191 views

Listing all term items alphabetically / sorting loop

I have my own custom post type and it has its own taxonomy and terms. Whenever user visits http://example.com/mytaxonomy/myterm I want the page to display all items within this term alphabetically. ...
1
vote
0answers
27 views

Simple custom post query for all the posts or many of them not working

I am doing this query $args = array( 'posts_per_page' => '-1', 'post_type' => 'custom_post_type', 'post_status' => 'publish' ); query_posts( $args ); but it is not working I have around ...
1
vote
0answers
231 views

Querying posts with meta value that begins with a certain pattern

I am trying to create a search filter using meta_query. The only problem I'm having now is that I can't compare with wildcards. I think that's how you word it? $keyword = 'sos'; $tlds = ...
1
vote
0answers
290 views

List Posts For Terms Of A Custom Taxonomy For Any Post Type

The function is great and i am using this function with these filter to just display selected taxonomy term posts by id, but what result i am getting is like this Child Taxonomy 1 - Child Taxonomy 1 ...
1
vote
0answers
270 views

define orderby URL with meta_key=post_views_count

I want to make an url with meta_key=post_views_count. E.g: http://www.mysampleweb.com/?meta_key=post_views_count&orderby=meta_value&order=DESC So the posts should be ordered by Views. ...
1
vote
0answers
465 views

filter custom field values $min $max

The user needs to query posts by entering a $minPrice, $maxPrice and a category value. Here is my query which returns no results: function result() { $result = array( 'cat' => ...
1
vote
0answers
291 views

Query_posts and attachments

I need some guidance on some WP code. I'm wondering if it's possible to take this code (which is grabbing all the images from the posts across my site and dumping them out): $args = array( ...
1
vote
0answers
122 views

Order by category titles

I have a category page called 'features' this is all fine, but the posts in the features category also belong to a certain genre of film, and it's this what I want to order the posts by on the actual ...
0
votes
0answers
9 views

Filter RSS feed for custom post type to events for next 7 days only

I'm trying to create a custom RSS feed that shows posts from the custom post type 'events' for the next 7 days ahead only. The feed is already sorted by event start date order rather than published ...
0
votes
0answers
31 views

archives page ordering posts by multiple custom fields with query_posts

On my archives page, I am displaying posts ordered by a custom field 'date1'. This is the code that I am using, and it works. $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( ...
0
votes
0answers
33 views

How to organize a WP_Query's list of posts by category and display category title?

If I run a query with some args and get a list of posts, how can I organize the posts separated by category and display the title of each category? $array_out = array(); $args = array( 'orderby' ...
0
votes
0answers
14 views

Cron job to delete post by title

I've searched a lot and I didn't find nothing that could help me. So, I want a cron job to automatically delete posts that have no title. Why I want that? I have a IFTTT recipe that automatically post ...
0
votes
0answers
14 views

Posts Duplicating due to Pagination and Custom Query

I have a custom meta field named “price” and I would like my main query to order the posts from highest to lowest price. Currently I have it setup like this: <?php $paged = ...
0
votes
0answers
30 views

query_post causes the posts to be loaded twice on load more posts

I am using query_post to randomize the posts in a custom post type. However this causes the posts to be loaded reloaded when i load more posts in. Below is my code: <?php ...
0
votes
0answers
17 views

Sort posts of custom_post_type according other post_type with metabox

I'll try to be as specific as possible because it's a bit confusing what I require. I'm trying to make a connection between two post_types with the help of a Metabox; This Metabox is showing in ...
0
votes
0answers
34 views

Max Posts and Memory Limit

So I have a custom post type which uses ACF Metaboxes that contains over 750 posts and grwoing. I got the infamous white screen of death because it seems like PHP has exhaused it's memory limit ...
0
votes
0answers
27 views

Plugin: Posts 2 Posts problems with private posts

I'm trying to connect two private posts to each other and it doesn't work! but the same code work correctly for other published posts. Even if i connect a published post to a private post, in ...
0
votes
0answers
69 views

WordPress multisite custom query pagination issue

I have a site with a query to grab by a particular category. The current site is also running a multisite system. Before upgrading to 3.9 this query worked fine, but after updating to wp 3.9 & ...
0
votes
0answers
60 views

Query Distinct Taxonomies of Custom Post Type

I have a custom post type called "coupons". These coupons can then be drilled down by "city". City is a custom field that is defined for each individual "coupon". I am then trying to modify a sidebar ...
0
votes
0answers
20 views

Post Query Glitch Causing First Post to be Out of Order

My problem is that there is a stubborn post at the top of the set of returned posts that somehow isn't sorted with the rest of them. Despite upgrading to 3.9, this issue still persists. For ...
0
votes
0answers
34 views

Query_posts using two custom taxonomies not returning posts

If I remove 'relation' and one of the taxonomy arrays the corresponding posts are returned for each taxonomy but when I add the 'relation' = 'AND' no posts are returned. Is there a problem in my ...
0
votes
0answers
35 views

query_posts with sorting on a custom datestamp

I have a custom meta field that I want to use to sort with query_posts but its not ordering my posts properly since it is a datestamp (i.e. 04/21/2014) and its treating it like a normal text string. ...
0
votes
0answers
28 views

Can display previous post with or without wp_pagenavi

I use Wordpress with the free version of Pageline platform theme. I figured out that the "previous/next entries" links are displayed on the main page but not on my others static pages. I tried to use ...
0
votes
0answers
119 views

Pagination not working on template page

I have the following code, but it is not working. if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } elseif ( get_query_var('page') ) { $paged = ...
0
votes
0answers
31 views

Global post is always custom post type last post

my global $post is always taking the object of my custom post type "advertisement". So when i'm editing e.g. "Hello world" which post id is 1, it shows me post id of the last advertisement post. If ...
0
votes
0answers
160 views

Polylang fallback language does not get activated even with patch

<?php //my patched archive.php to display posts of a category get_header(); ?> <div id="content"> <?php global $wp_query; ...
0
votes
0answers
117 views

Post per page not working

I have 2 parent categories are app and game. Beside them has child categories. My code get 6 post from 2 parent categories with orderby post date and order DESC, but post per page not working. Please ...
0
votes
0answers
24 views

Query Posts oder by Date

my query does not work as it should. This is my Code: wp_reset_query(); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'post', ...
0
votes
0answers
164 views

Display newest posts from multiple categories ordered by date

I have the categories listed below in my post post type. Category Name: Test 1 ID: 1 Category Name: Test 2 ID: 2 Category Name: Test 3 ID: 3 Category Name: Test 4 ID: 4 I'd like to retrieve for ...
0
votes
0answers
111 views

url_to_postid redirected posts

i wanna url_to_postid some urls, it work pretty fine but when it come to auto-redirected posts it fail to return postid. here is my example urls: http://animup.net/anime/kuroko-no-basket-2/ auto ...
0
votes
0answers
179 views

why is pre_get_posts not working

function include_category( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '3' ); } } add_action( 'pre_get_posts', 'include_category' ); I ...
0
votes
0answers
266 views

Query Posts From Multiple Post Types

Is there an easier or more efficient way of querying posts from multiple post types by the date of which they were published? I read this question here: Using Query Posts With Multiple Post Types And ...
0
votes
0answers
34 views

Array in POST request -> is 404

I send array in post request <form action='<?php echo get_permalink(); ?>' method='POST'> <input type="hidden" name="question[]" value="<?php echo $question->ID ?>"> ...
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
43 views

Joining column from table to query_posts

This is more of a question to be sure that I am on the right track with how I want to do this. I am using a custom template that uses elements of theme to display products based on filter results. I ...
0
votes
0answers
30 views

use more than one meta key in query using posts_where

Here I want to add query for more then one meta key as here: $where .= " AND meta_key='order_assign_delivery_date' AND meta_value LIKE '0000%' And meta_key='order_assign_data' AND meta_value=0"; so ...
0
votes
0answers
189 views

Add a DropDown Taxonomy Filter on Archive Page

I need to add a taxonomy dropdwon filter in archive page so that I can display the posts assigned to selected taxonomy. Here is the HTML Output for taxonomies: <form method="post" ...
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
206 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
53 views

Show post when both categories are present but not one of them

I'm having issue filtering posts by category. There is the A category for posts (which is the default and also applies when no category has been set explicitly) and B category with subcategories for ...
0
votes
0answers
33 views

Limit posts displayed to 2 specific posts

I'm using the Twenty Twelve theme. I have created a basic page. What I want to do is keep 2 only posts (that I select) on the page at all times. In looking at the code I think this is the section that ...
0
votes
0answers
38 views

Posts from current category on custom page

I have a problem - I want display posts from current category on page with custom template. I write something like this: <?php include 'header.php' ?> <div class='content'> ...
0
votes
0answers
42 views

Custom Fields & Posts

I've got one template, which I use on many different pages. The problem is that I want to show different posts according to their "pagename" category. Ex. "About" is going to show "About category" ...
0
votes
0answers
133 views

Post Filter clearing on pagination $_post

I have a form, in which users can select what taxonomy they want the posts filtered by. It works fine except that it doesn't paginate. When I click on the next page of results, it clears the query. ...