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
126 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
291 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
39 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 ...
1
vote
0answers
64 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
124 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
99 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
203 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
312 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
341 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
465 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
640 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
376 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
130 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
14 views

query_posts with meta_value

I have category 'news' http://localhost/foldername/news, for each 'news' posts I have custom field called 'years' and is set up as a Text Field. I have 2 values assigned n different posts '2013' and ...
0
votes
0answers
9 views

Different layout for newest post and posts in columns

I found some code that is supposed to show the most recent post first with any other posts underneath but it is only showing the 1st post. The image below shows what I would like the blog page to ...
0
votes
0answers
21 views

How to achieve an elegant way when using ajax to get data for a table in WordPress?

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 ...
0
votes
0answers
25 views

Use one column per category

I dont typically do wordpress development, though I am a PHP developer, so I get those concepts. I apologize if this has been asked and answered already. I looked through the questions as they ...
0
votes
0answers
28 views

Pagination on page.php with wp_query and query_posts

I'm trying to get pagination to work on a custom page.php and this has been kicking my butt... here is my site Here is my code: <!-- Page Blog Body Start ...
0
votes
0answers
12 views

Show different content in the same URL

I have a blog powered by Wordpress. I need to show different contents in a same webpage according to the date. Say I have few posts with the url format: domain.com/post-01022015, ...
0
votes
0answers
45 views

How to query and group posts by category?

/* * Loop through Categories and Display Posts within */ $post_type = 'post'; // Get all the taxonomies for this post type $taxonomies = get_object_taxonomies( array( ...
0
votes
0answers
20 views

Infinite scoll on search page not working

i have implemented infinite scroll feature to my custom wordpress theme which is working fine on home/index page but i search page of my theme the infinite scroll is not working properly. The Problem ...
0
votes
0answers
60 views

pre_get_post alter current post id

For some purpose, we want to apply a change to the Wordpress flow that affect's WooCommerce product page being displayed. When a product page is displayed (e.g. www.mysite.com/?product=my-product), ...
0
votes
0answers
51 views

Some posts appear in duplicate with paginated query

I'm querying a custom post type with some custom post meta, and then output the results. This is the query: $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $properties_query = array( ...
0
votes
0answers
37 views

How can I make Pagination Work on a WordPress Static Front Page

I have this pagination function I have been using on traditional post listing pages. But on my home page I have a section where I have post listings and I want to paginate them but it is not working. ...
0
votes
0answers
14 views

Get the page that have particular value in advanced custom field

All my pages have advanced custom field called : “Program slug” I would like to get link to the page that have particular value in that custom field. For example : Want to get link to the page that ...
0
votes
0answers
29 views

Menu not showing while using filter hook for custom posts

I have a custom post type named event and each event has a meta value named event_date. event post type has two custom taxonomy event_category and event_location. On the homepage I'm trying to show ...
0
votes
0answers
61 views

How can I add recent posts to menu like mashable

I would like create a mega menu that uses recent posts for hover state. Like When you hover a submenu you get a list of recent post relevant to that menu item like in Mashable. I I would like a menu ...
0
votes
0answers
7 views

merging two meta_keys

i want order posts with a combinaison between two meta_keys for each posts .. this combinaison is 'meta_key'=views/post_views_count .. & because i use the query_posts before loop so i have ...
0
votes
0answers
128 views

How to get Last post Id of custom post type in wordpress

I want to get last post id of a custom post type in wordpress. For this I tried this code- args = array( 'post_type' =>'soto_property', 'posts_per_page' => 1, ...
0
votes
0answers
42 views

Optimising specific Query with ACF meta objects

Is there any way I can improve the following query without touching the server, as it's taking around 5-6 seconds to execute, the SQL is outputing as: SELECT wp_posts.* FROM wp_posts INNER JOIN ...
0
votes
0answers
34 views

post by Category not working after setting 4 post per page

I am trying to show 4 posts on my homepage that is working fine but whenever i click on sidebar post categories it still shows the 4 post from homepage i.e the filter doesnot works and it shows 4 post ...
0
votes
0answers
79 views

Order posts by ACF checkbox

I would like to order the posts (archive.php) by listing the ones with the ACF checkbox "Premium" first, could someone please offer some advice?:) This is what I've tried so far: <?php echo ...
0
votes
0answers
109 views

Query Posts with meta_query key in array

I am trying to query posts using meta_query to get a series of dates stored as an array in the key repeat_intervals. I am able to query the first date using the following: global $post; query_posts( ...
0
votes
0answers
35 views

Auto create child post from custom field?

I have a custom post type that has 3 custom fields. If I create a post with data filled in those 3 custom fields I want it to auto create child posts for each custom field & using the data from ...
0
votes
0answers
59 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
61 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
90 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
21 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
320 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
133 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
17 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
142 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
25 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
16 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
81 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
38 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
46 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
120 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 ...