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

0
votes
1answer
126 views

Custom query shows custom post types in trash

I have a custom wordpress query like so: $query = new WP_Query(array('post_status' => 'future || publish', 'post_type' => 'kalender', 'order' => 'ASC')); But the problem is that the items ...
0
votes
1answer
391 views

filter posts by meta key with pagination

Trying to filter out specific posts that have certain meta_key from the main query... problem is it doesnt work with pagination which is my issue here. Anyone knows how to solve this? $paged = (end( ...
2
votes
1answer
35 views

Last posts from custom taxonomy

How can I post last posts from custom_taxonomy? I tried this like, but it doesn't works. $terms=get_terms('tax_name'); $request=array(); if(count($terms)>0) { foreach($terms as $t) { ...
0
votes
2answers
114 views

show posts from one category with comments only

Would anybody have a good idea for getting the WP to spit out all posts from a category with (approved) comments only? I have an ecommerce site set up, and treat comments on product posts as ...
1
vote
1answer
130 views

using post__in allow duplicate post id

I have an array of ids in a specific order. I use post__in in my query to get posts from this array. I have some duplicate post IDs that I need to show twice in the page but the query seems to ignore ...
1
vote
1answer
205 views

Custom MySQL Query with logic

I have wp e-commerce plugin installed and custom building custom global search My query looks like this SELECT * FROM aka_v_posts LEFT JOIN aka_v_postmeta ON aka_v_posts.ID=aka_v_postmeta.post_id ...
0
votes
2answers
63 views

Is that the query_posts() the real criminal here?

<div class="single_post"> <?php // The Query query_posts( $args ); // The Loop if(have_posts()) : while ( have_posts() ) : the_post(); ?> <div ...
0
votes
1answer
312 views

new WP_Query issues

My default wordpress set hold 10 posts per page. In category.php , I want to override this with 999 post per page, the problem is that isn't working at all. When I use the following code. it ...
2
votes
1answer
274 views

Using database meta_values to calculate new post order using pre_get_posts or a 'request' hook

UPDATE: I have worked out my implementation of the selected answer at the bottom of this post. I'm implementing a sorting algorithm based on Reddit's hotness algorithm, in addition to a time-decay ...
0
votes
1answer
86 views

Archive template combined with post slider and regular posts

I am trying to find the best and easiest way of modifying my archive.php template to contain slider on top which slides the 4 first posts and the rest (6) will be displayed beneath as a regular posts. ...
0
votes
1answer
207 views

Search a title word through query_posts (not the exact match)

We're working on a database with personal data from different sportsmen such as name, height, weight, etc. We've managed to build a detailed filter through query_posts. Every filter field is working ...
1
vote
3answers
69 views

Trouble Making WP_Query paged

I'm using the query below in the index.php file as the main query, whenever I try to go to the 2nd page I get a 404 error, I tried using posts_per_page but to no avail. <?php $args = array( ...
1
vote
1answer
467 views

WordPress get posts by date without query_posts

I'm want to get posts from the last 30days in a sidebar but I don't want to use query_posts, is there a way to achieve this with the get posts function?
0
votes
1answer
76 views

How to order posts in an arbitrary order?

I need to list posts in a very specific order that has nothing to do with the date of the posts or the title, or anything WordPress can figure out for me. I need this order to be used when I list ...
1
vote
1answer
38 views

child of post type (custom)

I registered a custom post type (foo) with register_post_type, setting 'hierarchical' => true,so now when I want to use it I have post_type=foo. How can I query child of foo? any ideas? thanks!
-1
votes
1answer
220 views

How do I find the first item in the post array?

I left ????? where I need the answer. <?php global $post; $the_post_ID = $post->ID; $n = get_posts(); ?> <?php foreach ( $n as $post ) : ?> <nav id="postNav"> <ul> ...
0
votes
1answer
443 views

Query Multiple Custom Post Types & Exclude a Taxonomy Term

I'm querying multiple custom posts types and I'd like to filter certain posts that are tagged with a specific taxonomy term. The taxonomy is "content" and the term is "indy" I'm using the the code ...
0
votes
1answer
97 views

What's the best way to show custom post types? With page template it's not perfect!

I created a custom post type with name career. I would like to know what's the best way to list the posts. I created a page template with a query inside, but the pager is invisible. I don't know ...
0
votes
1answer
29 views

Custom Post type showing up in loop, regular posts are not showing up

Every one knows the basic WordPress loop, every one knows that if you want just posts in a loop you put query_posts("post_type=post"); BEFORE the loop. which I have done. The problem is I have a ...
1
vote
1answer
671 views

query_posts and custom taxonomy posts order

i have a custom taxonomy defined for "Projects" and a page that shows all the projects. In this page there's a jquery filtering menu (isotope). Initially the page must show all the projects but ...
1
vote
1answer
2k views

query_posts() vs get_posts() multiple loops [duplicate]

I have a template which initially had one single loop and it was using query_posts, I added 2 more loops using the same method, However after reading allot about these it was concluded that I shall ...
0
votes
1answer
43 views

Posts being viewed

I am looking for a way to list posts being viewed but I can't find anything online. Is it even possible? I've seen some websites that have these loops, "What other readers are currently reading". ...
-1
votes
1answer
50 views

Getting taxonomies specific to categories

I have categories set up for car manufacturers. I have 4 custom taxonomies that are also set up: color, starburst, offer_type, and logo_count. Each post I upload to my wordpress has values for all 4 ...
0
votes
1answer
604 views

Pagination on category.php and tag.php not working

i'm using a query-loop on my template pages like this: <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query(); ...
1
vote
1answer
971 views

Ensuring sticky posts are retrieved first (without using two queries)?

I need to maintain pagination for use with infinite scroll. Is there no way to tell query_posts to retrieve sticky posts first? It seems to be default behaviour on a standard wordpress blog on the ...
2
votes
1answer
220 views

order by meta_value serialized array

Hi I'm trying to pull posts using the wp query. Just one problem--I am trying to sort the posts alphabetically by a certain meta_value. Thing is that this meta_value is a serialized array. Is there an ...
1
vote
1answer
764 views

How to query a custom post type with a taxonomy filter but display post type archive page?

I'm filtering the main query of Jigoshop with my own taxonomy with this hook (The file responsible for Jigoshop queries that I'm hooking, Jigoshop hooks onto WP 'request' filter): add_filter( ...
1
vote
1answer
1k views

Filtering custom taxonomies

This is a cross post from the WordPress forums, which I apologize for, but it has been almost a week and not getting any response there so hoping someone here can help. If I do get a reply in either ...
0
votes
1answer
1k views

Paginate WordPress Category Pages

I am using the following query on my category.php template: <?php $paged = (get_query_var("paged")) ? get_query_var("paged") : 1; query_posts("posts_per_page=2&paged=".$paged); ?> ...
0
votes
1answer
50 views

Creating pages and getting their values from the database table

I need to make inquries from my new website. I want to know whether Wordpress is capable of this: Say it I have such a table: CREATE TABLE IF NOT EXISTS `mytable` ( `id` int(11) NOT NULL ...
0
votes
1answer
47 views

Adding Category Argument into an Array for WordPress Query

I'm new to customizing WordPress and am looking to query an array of posts within a certain category. I have a display that's showing an array of all posts from the site: $arguments = array( ...
0
votes
1answer
229 views

Problem with query_posts for a custom taxonomy in theme options

I am having some issues with querying the output of custom taxonomies in my theme options. I have included what I think are the necessaries below. Many thanks for your help in advance. // Pull all ...
1
vote
2answers
1k views

Sort Posts by Multiple Meta Values

1) Custom Post Type named "Buying_Locations" 2) Each Post has three meta values of: State, City, Store Name QUESTION: How can you show a list of these posts sorted alphabetically by State, then ...
0
votes
1answer
61 views

single.php fires more than once after clicking on any post to view with different post id each time

I am now experiencing a wired problem with my wordpress installation. I was surprised when I saw post view counter of another post also increased including the the post on which I clicked to try and ...
0
votes
1answer
2k views

Why WP_Query('showposts=5') shows only 1 post?

I am trying to do a simple query to get the latest 5 posts into an unordered list, but this is only showing 1 result even though I have several posts. I even did an offset, but it shows the next post ...
0
votes
1answer
407 views

pagination does not work with query_posts. Help! [duplicate]

I made ​​a separate page template (added sidebar), this page contains all the posts. Pagination works! But, if this page set as the home page, pagination is not working! Please help find solutions ...
0
votes
1answer
89 views

How to solve this without flushing the rewrite rules for each post query the visitor triggers?

Actually I have the problem that I provide a menu link (predefined in theme) to the latest post of a specific custom post type. I achieve this by the following function … function ...
1
vote
1answer
519 views

How do I query a custom post type with a custom taxonomy?

For some reason I'm finding it a struggle to grab any posts using a custom taxonomy... can anyone unravel my stupidity? $args = array( 'post_type' => 'adverts', 'advert_tag' => ...
1
vote
1answer
190 views

Get Posts updated or published within the last x hours

Okay, I'm trying to get posts that have been published within the last x amount of time, options being 8, 24 or 72 hours. I have the variables being passed to my featureHandler.php via ajax, then ...
1
vote
1answer
266 views

How to optimize 'select found_rows()' query? Several 'high load average' alerts daily

I have 5,000 regular posts, 6,000 posts in one post type and 2,000 posts in another post type. Needless to say, that has made the wp_posts table quite large. Not to mention, I have custom taxonomies ...
1
vote
1answer
239 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
0
votes
2answers
2k views

Show specific category posts on Genesis framework home page

My site has Genesis framework and a child theme. I want to show specific category posts on my home page content area. I used the simple post query ...
0
votes
2answers
224 views

Trying to query all posts in category 4

I have the following template page. I am attempting to output all of the articles from the category 4. However I am only getting some of the posts, about 20% of them. Not sure what would be causing ...
3
votes
1answer
485 views

Using is_main_query to select custom post type on certain page

I've been trying to implement some of the ideas discussed by Andrew Nacin http://wordpress.tv/2012/06/15/andrew-nacin-wp_query/ into my workflow, specifically trying to move away from using ...
0
votes
1answer
155 views

Display 3 posts with different HTML markup using a loop

I want to be able to display 3 posts from the same category on my index.php page, but due to the way my site's HTML/CSS is coded I'm having some difficulty understanding the correct way to go about ...
0
votes
2answers
76 views

Getting posts from some categories plus some individual posts

I want to display list of all posts under a couple of categories and some individual posts. If I use the following code, it does not return anything, as it looks for those individual posts in the ...
0
votes
1answer
67 views

Limit the number of child pages

I have this html structure: <home> <Web> <web 1> <web 2> <web 3> <web 4> <web 5> <web 6> <web 7> </web> <Print> ...
0
votes
1answer
94 views

Wordpress plugin not eching popular posts

I created a plugin in wordpress to show popular posts, but this is not returning the post and number of comments properly. Even I have comments in my post(approved as well, so this is not the case) ...
0
votes
3answers
96 views

how can i hide category?

Please help me I am new baby in wordpress, how can i hide that 'course or call' category from the page.. i have var dump the variable which is passing as parameter to query_post $args = ...
0
votes
1answer
79 views

How can i listing current category and Featured Category post list?

I have a Featured Post Category. Im marked some post Featured. When i viewing a category page(e.g. Sport), i want to list on sidebar both marked post list (e.g Featured and Sport,) I tryed with that ...