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
138 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
453 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
2k 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
6 views

Taxonomy.php create a search filter with dropdown

I'm trying to create a custom taxonomy.php page where my users can refine search into that context. I've tried to create a kind of loop like: <?php if(!empty($_GET['ending'])) ...
1
vote
0answers
50 views

How to display an other custom post type in a different custom post type's archive?

Background: I need to display all posts of a custom post type called "recipes", that have a specific taxonomy "fish", right under the permalink "www.mysite.com/recipes/fish". What I have done: I ...
1
vote
0answers
21 views

How to retrieve an array of post IDs by a particular value stored in a custom meta's array

I have a custom post type 'projects' that has custom post meta 'members'. 'members' stores an array of another custom post type's IDs. I'd like to do loop through the 'projects' posts that have a ...
1
vote
0answers
53 views

Random ajax load only works with posts_per_page set to -1

I created a post loader shortcode, that uses AJAX to load posts. Even though I can set the order and order_by query parameters, the order_by should be random. From what I've seen on the web, ajax load ...
1
vote
0answers
12 views

Homepage's content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?

I have a custom field in my home page called "Featured posts". There are two fields: title and post. The post field returns post_object with post_type as posts. In my functions.php I have added the ...
1
vote
0answers
28 views

How to get Related Custom Posts?

So i am having an issue where i try to get the latest posts but also the related one from Custom Post Format - Video. Didnt see anywhere this solution/tut, is it even possible, i guess it is. I just ...
1
vote
0answers
63 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
89 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
139 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
107 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
206 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
31 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
369 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
364 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
619 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
797 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
422 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
136 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
13 views

How to query post from sub-categories on category archive and display posts?

On a custom taxonomy archive from the taxonomy called 'books' (taxonomy-books.php) I want to list all subcategories that are assigned to the parent category. And then for each subcategory I want to ...
0
votes
0answers
14 views

Publish four random posts each day

I am currently using the following code to publish four posts in my home page. query_posts('cat=14&showposts=4&offset=1'); if (have_posts()) : while (have_posts()) : ...
0
votes
0answers
21 views

Search result by taxonomy name

Currently my search filters by title and I'm trying to filtered by taxonomy tags. How do you I do that. Here is my code: $query = " SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_status = ...
0
votes
0answers
21 views

Query returning 1 post per page but saying it has 71 pages with almost 1500 results in total

Something is definitely not right here and I honestly cannot understand what it it. After I put this code on one of my custom made plugins, although it makes the search correctly (the result ...
0
votes
0answers
10 views

Category and post_lists

I´m trying to make a template for a wordpress site where i need to fetch posts form two different categories - two times. (ie.two loops) But seems like the category sort is just working for the ...
0
votes
0answers
32 views

Frontend Post with JQuery AJAX to Php Issue

My problem is the following. I'm trying to make users publish custom post_type by frontend through a form like this: <form id="msform" enctype="multipart/form-data"> <fieldset ...
0
votes
0answers
39 views

Omitting the latest entry with custom type and taxonomy term from the loop

My agency has inherited a client with a customized theme provided to them from a separate agency, which farmed the work to another agency off-shore. The documentation for this theme is non-existent ...
0
votes
0answers
13 views

Configure number of posts to show on Wordpress page using Redux Framework

I am using Redux Framework for theme options on a theme I am working on. I want users to be able to set the number of posts to show in a certain section. Right now it's hard coded to 3. But I added ...
0
votes
0answers
26 views

Set Popular Post by views weekly?

I've tried several times, but still didn't work. Anyone have an idea? EDIT: This actually works, but only get popular post all of time. I want popular post by week. what needs to be added? This my ...
0
votes
0answers
21 views

Query Database for URL

I have a multisite setup and was wondering how I can query a database to find and retrieve a URL if it exists, otherwise, don't output anything... For example, using the two following domains which ...
0
votes
0answers
47 views

WP tag slug name in URL

I want display tags from specify category. My code is: $query_args = array( 'category__in' => $category->term_id , 'posts_per_page' => -1 ) $query = new WP_Query( $query_args ); ...
0
votes
0answers
77 views

Imported Content Doesnt Show Up On Frontend

I found similar problems posted couple times, for different custom post types, but none of the solutions worked for me and these, other questions, didnt have much info provided, I'll try to give as ...
0
votes
0answers
8 views

How can I add a search input for every column in manage posts?

I am attempting to make it so that I can compare inputs to individual post variables. I can't seem to get this to work though. I have a filter for manage_lead_posts_columns (lead is my post type), ...
0
votes
0answers
55 views

Adding custom fields multi value using json-api

I'm using json-api to create a post with custom fields using query: ...
0
votes
0answers
27 views

Can I Use Query_Posts() For Dynamic Filtering?

The Codex page for Query_posts() basically says "don't use query_posts". However, I have tried all of the alternatives they suggest, as well as methods from other sources, and I have had no luck. ...
0
votes
0answers
16 views

Making sure to always display posts from three different authors

Say I want to display nine posts on my homepage, and have 3 authors on the blog. Using WP_Query or a similar method, Is it possible to make sure that at least 1 or 2 posts from each author is ...
0
votes
0answers
51 views

Ordering Posts by parent category, name ascending

I am currently creating a theme, and I have 2 parent categories: Budget and Brand. On home.php, I want to order all the posts ascending by their sub category name without showing the category title. ...
0
votes
0answers
50 views

Search on Category and BETWEEN custom meta field

Background I am building simple car theme where I want to review cars, however, I'm really struggling with my search implementation. I have added a couple of custom meta fields to the post including ...
0
votes
0answers
84 views

Used with meta_query in query_posts works slowly

Hey i have a problem this my code and if i used with all parameters i get from $_GET its start work so slowly..... (like 5 min). $checkbox = array( 'immediate'=>'כניסה מידית', ...
0
votes
0answers
35 views

Cannot Get Title or Thumbnail of Posts Page

I set up a page called 'News' and applied this as my posts page. I am really struggling, however, to output the title 'News' or the featured image that has been added to the page itself. Whenever I ...
0
votes
0answers
38 views

Need help writing loop to display posts by categories in separate divs

Total newb to WP codex. Below is what I'm attempting (the comments describe what I want the loop to do). Thanks in advance for your help! <!-- if there are posts in category slug A, show div below ...
0
votes
0answers
500 views

How to display most popular post by views count in WordPress?

I tried to display the most view post in last 30 days in my WP page, how to do this? What I did is: <div>Most Read Blog Posts Over Past 30 Days</div> ...
0
votes
0answers
145 views

How to add number of post to category menu items

I wanted to know how we can add number of posts for dropdown menu items that are categories. For example: Topics Category 1 (5) Category 2 (8) Category 3 (2) More Topics Category 1 (5) ...
0
votes
0answers
99 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
41 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
193 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
64 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
67 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
232 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), ...