Adavnced custom fields relationship query plus query inside

Looks like you’re using both get_posts() and new WP_Query() — You only need one or the other. You’re also using WP_Query() incorrectly — It’s looking for an array of arguments, but you’re passing $videos, which is an array of post objects. Try this: <?php $args = array( ‘post_type’ => ‘videos’, ‘meta_query’ => array( ‘relation’ => … Read more

pagination not working for category.php (custom post types in categories)

<?php $catname = wp_title(”, false); $wp_query = new WP_Query(); $wp_query->query(‘category_name=”.$catname.”&showposts=5′.’&paged=’.$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <?php the_title(); ?> <?php } ?> <?php endwhile; ?> <?php next_posts_link(‘&laquo; Older Entries’) ?> <?php previous_posts_link(‘Newer Entries &raquo;’) ?> I think that you need to look at the $paged variables.