WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I display multiple pages on 1 page? (8 posts)

  1. Will White
    Member
    Posted 3 years ago #

    There are three content sections I would like to have cycle via jCarousel. What makes this tricky is that I'd like the client I'm building the theme for to be able to access and update the content of each content section via separate "Pages" in the dashboard - I think it would help keep the content organized and minimize the risk of them removing any custom html I might have to add to split up the three sections.

    Is there a way to use the loop to call three specific pages consecutively? Can I run the same loop with different attributes three times in one page?

    I've been looking for a tutorial but haven't been able to find one - at least not for 3.0.X.

    If one of you guys has seen something that would help, I'd appreciate any advice/links/direction.

    Thanks in advance.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

  3. Will White
    Member
    Posted 3 years ago #

    Thats the direction I needed.

    Thanks!

  4. Will White
    Member
    Posted 3 years ago #

    Grr I started messing with query_posts and I'm having difficulty getting it to pull the contents of pages so I can display them in three separate <li>'s.

    Can you point me more specifically to where I should be looking in this article?

  5. esmi
    Forum Moderator
    Posted 3 years ago #

    Just use something like:

    <?php if (have_posts()) :?>
    <ul>
    <?php while (have_posts()) : the_post(); ?>
    <li <?php post_class();?> id="post-<?php the_ID();?>">
    [ rest of the Loop ]
    </li>
    <?php endwhile; ?>
    </ul>
    <?php endif;
  6. Will White
    Member
    Posted 3 years ago #

    Just figured it out.

    Ended up calling query post to get the specific page, then running the loop, then later on resetting query post to pull the next specific page, then running the loop again, etc.

    Thanks!

  7. Will White
    Member
    Posted 3 years ago #

    The Code I used - now I can use any jQuery etc I want to cycle the entire content div's - and each div is still editable via separate pages in the dashboard for client use.

    [Code moderated as per the Forum Rules. Please use the pastebin]

  8. joeyvestal
    Member
    Posted 2 years ago #

    WillPCG, could you post the code you ended up using?

Topic Closed

This topic has been closed to new replies.

About this Topic