Tag Info

Hot answers tagged

3

See the codex re Meta Query. For example, this would get all posts at least a day old: $date = date('Y-m-d H:i:s',strtotime("-1 days")); // 1 day ago meta_query' => array( array( 'key' => 'name of your key', 'value' => $date, 'compare' => '<=', 'type' => ...


3

I don't think there is a parameter value Today as you used in date_query. If you want to return today's post then you should provide date value to date_query as you stored current date in $today array. So here is your query now. $today = getdate(); $args = array( 'tag_slug__in' => array( 'destacado'), 'posts_per_page' => ...


2

In the dump of your $args above, nopaging is set to 1 which disables pagination (equivalent to posts_per_page = -1). Try setting this to false and see if it fixes your issue. You can then look into why it's being set.


1

On the advise of Robert and Pieter I rewrote the loops using WP_Query instead of query_posts. It works now. Thanks guys. Here's the code: <ul class="tabs"> <li class="tab-link current" data-tab="tab-1">Most Popular</li> <li class="tab-link" data-tab="tab-2">Recent</li> ...


1

You have two issues here. The use of $image->ID in this line wp_get_attachment_image($image->ID, 'video-thumb'); This will give you the following error: NOTICE Error: [8] Undefined variable: image In all honesty, I think that should actually be $post->ID get_permalink() returns the permalink to the current post, which in this case ...



Only top voted, non community-wiki answers of a minimum length are eligible