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
86 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
212 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
33 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
105 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
96 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
194 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
28 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
259 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
309 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
345 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
542 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
322 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
125 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
25 views

Advanced Custom Fields shows all posts

My ACF plugin shall only show posts with my organisation type = socialbusiness. Somehow it doesn't even care about my meta_query, it also doesn't care about the categories I selected (it shows "blog" ...
0
votes
0answers
18 views

Sorting with custom field and 'comment_count' - orderby

How can I also add comment_count to my existing query? Below query works fine and sorts the archive with highest rating_avg only, I would like to sort my archive using rating_avg first and then the ...
0
votes
0answers
32 views

Carousel with most viewed posts from last 7 days

I'm looking for a way to display the most viewed post from the last seven days into a carousel ( displaying the image thumbnail, and the title). I'm using a existing carousel, and trying to tweak it ...
0
votes
0answers
9 views

How do I make query use exact post title

I am creating a custom search query in wordpress and the post title isn't matching. I want it to say the posttitle and the firstname have to be exact matches, or nothing should come up under the ...
0
votes
0answers
15 views

Modified query_string has stopped working in WP4

The code blow was used to load a filtered taxonomy archive and worked fine up until the release of WordPress 4.0. Since upgrading to 4.0, it's not returning any results. Any ideas what might have ...
0
votes
0answers
76 views

Display page content inside a onclick popup or fancybox or lightbox

I'm doing a single page theme. So in that I would like to have some links which load the page content of the page inside a fancybox or lightbox. I've already tried Best way to load page content in ...
0
votes
0answers
70 views

Ordering posts alphabetically by meta keys and title

I have a query for custom posts and I have managed to order the results alphabetically based on the title first then a 2nd alphabetical ordering of the 1st of 2 meta keys "Species". This works great. ...
0
votes
0answers
14 views

Query Post Using Date custom field which has series of dates

I am working on a golf course booking website. The booking dates are stored using a custom meta box in a textbox like this 2014-09-26, 2014-09-29, 2014-10-01, 2014-10-05, 2014-10-06, ...
0
votes
0answers
62 views

Sort Posts By Custom Field Date

I know it's not a new question, but everything I found fails to sort my posts. I simply want to sort 30 posts that have a custom field, let's say "album_date_sort", by the date entered in its value. ...
0
votes
0answers
19 views

Why I obtain this WP_Query strange behavior trying to select posts having a specific tag?

I have the following problem with featured tag posts I have a page of a website in wich I want to show only the posts that have setted a specific tag (using the loop). So in this page I have put ...
0
votes
0answers
13 views

Why I have this strange behavior when I try to exlude the featured post from posts visualization?

I am quite new to WordPress theme development and I have a strange behavior with this custom theme on which I am working: http://lnx.asper-eritrea.com/ As you can see in the home page I have 2 areas ...
0
votes
0answers
58 views

Why doesn't my WordPress page show the most recent post?

I was wondering if someone could help me with the following. My news page on my WordPress website doesn't show the most recent blog post, which I want it to do. The code I have is: ...
0
votes
0answers
22 views

Query_post does not get the post_content

When I use before a loop query_posts( '%cat=4'); I get everything, including the post_content field, but when I use the code from here: http://codex.wordpress.org/Function_Reference/query_posts ...
0
votes
0answers
28 views

How to customize page navigation to different query_posts

I work on category.php For the first page i want to show posts under premium category and [the clicked category link] so i used the query post: category__and' => 4208,$cat_id Then when clicked NEXT: ...
0
votes
0answers
61 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
105 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
61 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
28 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
31 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
46 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
22 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
67 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
90 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
86 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
45 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
40 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
184 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
35 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
297 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
171 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
25 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
174 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
147 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
275 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
294 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 ...