ThemeShaper Forums » Thematic

[closed]

Adding multiple loops to a page layout.

(3 posts)
  • Started 3 years ago by dannewman
  • Latest reply from middlesister
  • This topic is not resolved
  1. dannewman
    Member

    Hey I am trying to design a Single page layout where all of the content feeds into a single page. I am having a problem getting the loop to into the page. I am trying to put use this to insert multiple instances of the loop.

    <?php
    					$args = array(
    					    'posts_per_page' => get_option( 'posts_per_page' ),
    					    'paged' => $paged,
    					    'category_name' => 'News',
    					    'tag_slug__and' => array(  )
    					);
    					$wp_query->query( $args );
    					$more = 0;
    					?>

    While having the Category name change to separate different content into different loops that all display on a single page. Nothing is showing up. Am I missing something obvious here?

    Posted 3 years ago #
  2. i like using get_posts() for multiple loops

    http://codex.wordpress.org/Template_Tags/get_posts

    Posted 3 years ago #
  3. middlesister
    Member

    With your code, you are resetting the query instead of making a new one. Take a look at http://forums.themeshaper.com/topic/multiple-loops-demystified. I agree with Helga - get_posts might be easier if you have many loops.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.