Converting multiple loops into one single loop with pagination

You can refer this. Use the examples part. Inside the foreach loop put your all the code which needs to be repeated for each category type. something like: <?php $categories = get_the_category(); if($categories){ foreach($categories as $category) { $my_query = new WP_Query(‘cat=$category->term_id’); //code to display category posts goes here } } ?> You are ready to … Read more

Implementing an OR statement to wordpress wp_query

You can run two queries and merge the results: $cat_query_args = array( ‘paged’ => $paged, ‘order’ => ‘DESC’, ‘meta_key’ => ‘android_link’, ‘post_type’ => array( ‘post’, ‘app’ ), ‘cat’ => ’63’, ); $meta_query_args = array( ‘meta_query’ => array( array( ‘key’ => ‘android_link’, ‘compare’ => ‘EXISTS’, ) ) ); $cat_query = new WP_Query( $cat_query_args ); $meta_query = … Read more

single page site with subpages

To me it’s very simple, but a bit static. You can make a new front-page.php with the structure you mentioned. Then first make some pages (i.e.: About us, Members 1, Contact etc.) in your wp-admin. And use the get_page() function to call different page [using their individual ID] into different zone. Am I right?

Enable infinite scroll on single.php [closed]

Here’s the direction to go, I think: The WP Infinite Scroll plugin works by identifying your page’s navigation and then, I think, loading the next link found there. So instead modifying the query on single.php, I’m now trying to modify the pagination. I’ve tried several pagination functions, such as posts_nav_link() and twentytwelve_content_nav( ‘nav-below’ ), neither … Read more