The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
19 views

2 queries with counters

I have 2 loops on a page both containing a counter to implement slightly different code every 6 posts. For some reason though the second loop is implementing the different code sometimes after 4 items ...
0
votes
1answer
35 views

How to do a loop inside a loop?

I'm trying to get posts from a custom posts using WP_Query. <ul> <?php $query1 = query_posts( array( 'posts_per_page' => -1, 'post_type' => array('specialties') )); ...
0
votes
1answer
31 views

Different number of posts showing in development vs production server

So I'm working on a website for a client. Everything works fine except for the fact that the number of posts showing in the homepage of my development server is different from the number of posts ...
0
votes
2answers
52 views

Related post by category throws internal server error

I am using thesis in wordpress 4.1 i am trying to display related post by category with bellow function but when i go to the post detail page it throws internal server error.i have used same code in ...
0
votes
0answers
38 views

wordpress wp_reset_query makes jquery tabs stop working

here is my code,the slider tab is working fine if i don't add wp_reset_query() but when i add it. it stops working.I tried all.Please any suggestion for this. <?php query_posts(array( ...
2
votes
1answer
2k views

wp_reset_postdata() or wp_reset_query() after a custom loop?

Reading som stuff about query_reset_postdata and query_reset_query makes me confused... For example: 1) Is there any need to use both wp_reset_postdata and wp_reset_query together? ...
0
votes
2answers
447 views

WP_Query and is_page_template() conditional

I have a custom query that goes looks like this: $temp = $wp_query; $wp_query = null; $args = array('posts_per_page' => 5, 'post_type' => 'gallery', 'post_status' => ...
-1
votes
1answer
398 views

Resetting a Query using wp_reset_query() or wp_reset_postdata() does not work

I am using ACF as related posts. I have the following code. <?php $post_objects = get_field('repeater_related_items'); if( $post_objects ): ?> <ul> <?php foreach( $post_objects ...
0
votes
1answer
54 views

Loop being strainge

So I hacked together a function that does the following: protected function _query_post($query){ $original = $this->_wp_query; $wp_query = new WP_Query($query); ...
0
votes
1answer
432 views

Problem with different query loops (and “main loop”) on category template page!

so, heres the problem: i've created a category-template (category.php) with two query loops and the main loop (in which the content from the category should get looped in). if i now click on a ...
3
votes
1answer
1k views

Is it necessary to reset the query after using get_posts()?

Is it necessary to reset the query after using get_posts() ? I have been looking at this page and I don't see any reference to get_posts() ... I can't make it out for sure from this page either. I ...