0
votes
0answers
19 views

Timeout error 504 with 2 query_posts , how can I make them work?

Im experiencing a error: ERROR 504 - GATEWAY TIMEOUT then ERROR 500... Database connection problem. etc. I have this loops that works fine IF in logged... if not, it doesn't work... Update: I ...
7
votes
5answers
5k views

the_date() not working

I am using wordpress 3.2 and I did a query post like this: <?php query_posts("posts_per_page=1post=type&page=post_parent=10");?> Then I try to echo out the date of this post I queried ...
1
vote
1answer
5k views

How to display related posts from same category?

Is it possible to display related posts from same category as the current post?
0
votes
2answers
1k views

WP_Query within function within WP_Query

I have a query which looks like this: $args = arguments for the query $query = new WP_Query($args); while ($query->have_posts()): $query->the_post(); $post_id = get_the_ID(); echo my_function($...
5
votes
2answers
22k views

How to get posts published between a date and today?

Is it a way to get posts published between a date and today with query_posts() ? Example : All posts published since 2012-04-01 Thanks EDIT : How to add the filter date on this Query Posts ? ...
-1
votes
0answers
29 views

Posts pagination bug

My index.php looks like this: <div class="container"> <div class="row"> <div id="primary" class="content-area <?php echo apply_filters('primary_bootstrap_class', 'col-sm-...
0
votes
1answer
101 views

How to remove /page/2/ from home page?

First of all: I don't understand the meaning or the action that http://myurl/page/2 does? I checked the Net tab in Firebug and saw that my page takes more than 3 seconds to load /page/2... but I don'...
3
votes
2answers
68 views

Is `query_posts` really slower than secondary query?

I know the main query is fast, since it gets data after parsing the URL and after WP_Query has been instantiated. We are in OO PHP. But is query_posts really slower than some secondary query that ...
8
votes
2answers
136 views

Why query_posts() isn't marked as deprecated?

There are two query_posts() functions technically speaking. One query_posts() is actually WP_Query::query_posts() and the other is in global space. Asking from sanity: If global query_posts() is ...
0
votes
0answers
21 views

Display Posts in Admin Page

I create a admin page. Now I need to display posts in that page. Should I use WP_Query or get_posts()? (Pagination should be there) Note : I have read When should you use WP_Query vs query_posts() ...
10
votes
1answer
1k views

Using pre_get_posts on true pages and static front pages

I have done quite extensive research on how to use pre_get_posts on true pages and the static front pages, and it seems that there is no fool proof method. The best option I found to date was from a ...
0
votes
1answer
37 views

Show more than one post on the main page excluding certain category

I'm currently running WordPress 4.5 with a WooTheme called The Morning After. I decided to change a few things here and there, but encountered some issues regarding the posts_per_page argument used in ...
-1
votes
1answer
41 views

Pagination 404 on my index.php

I'm trying for days how fix pagination on index of my wordpress site. Pagination work great on category and other archive but doesn't work on my index clicking on the page numbers have a 404. I found ...
0
votes
1answer
41 views

How do I display child post types in the parent post type template

I have a custom post type called airports which uses a template called single-airports.php. I have created a new airport called Gatwick and created a child of this called called Gatwick North ...
0
votes
1answer
32 views

Adding arg to search results page

I want to show future posts in search results, categories, etc. This site says to use the following code: $args = array( 'post_status' => array('publish', 'future'), ); query_posts( $args ); ...

15 30 50 per page