WordPress.org

Ready to get started?Download WordPress

Forums

Use the Loop and second query in 1 page (4 posts)

  1. brnater
    Member
    Posted 3 years ago #

    Hello all. On a static page, I'm using the_post(); to only pull the page title, no need to start a loop here. Then I'm using Dreamweaver CS5's database function to create a new connection and loop the post_title(); post_date(); and post_content(); from private posts only in a specific Category. The code is breaking, and moreover I'm sure WP has an easier method using wp_query...

    But how do i use it? How do I script it so I don't break the first the_post(); loop? I'm sure I'm also missing an endwhile statement in there somewhere as well.

  2. brnater
    Member
    Posted 3 years ago #

    Here is the script:

    [code moderated per forum rules - please use the pastebin]

  3. stvwlf
    Member
    Posted 3 years ago #

  4. brnater
    Member
    Posted 3 years ago #

    2 words. Life. Saver.

Topic Closed

This topic has been closed to new replies.

About this Topic