Try rewinding the Loop, via rewind_posts()
, between the two loops?
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
asd
<?php endwhile; endif; ?>
<?php rewind_posts(); // REWIND THE LOOP! ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<?php the_content(); ?>
<?php endwhile; ?>
Related Posts:
- How to return results of a get_posts() in explicitly defined order
- Modify main WordPress loop with a parse_query filter
- How should I intercept the main query and inject custom join / order by / group by criteria
- Dynamically excluding current page id
- How to order results by date and meta key?
- Static Front-Page Excerpts
- Is it possible to query_posts using post__in and then Loop through them in the ordered they were queried?
- query_posts() ALWAYS displays something?
- How to remove a plugin filter’s priority on specific loops (custom queries)?
- Custom loops, sticky posts, and pagination nightmare
- Filter Loop by Custom Field Value
- Modify loop but keep the original query, what am I doing wrong?
- When to use WordPress loop or Foreach loop?
- Post per page not working if no category specified
- Calling Posts from Specified Cat
- Most Effective Method? Exclude Category and Number of Posts Per Page
- How do I query based on the modified date?
- Script that gets the first tag of post and query all other posts with the same tag
- How to add an “or” instead of and “and” (&) in a WordPress query?
- Modify main loop query for paged and meta key
- Create a Loop with Posts Ordered by Most Recent Comments
- Specifying image size used in template the_content
- query_posts and sub pages?
- WordPress loop problem: Multiple loops, index.php and is_paged causing duplicate posts on next page
- Including post data in a sidebar occurring outside of and before the Loop
- Multiple loops with / without sticky posts and different post limits
- Some doubts about how the main query and the custom query works in this custom theme?
- Is there a way to exclude the content from the post variable to save on RAM usage?
- Display/query post formats
- How to query post by user role?
- query_posts() in function makes global $wp_query out of sync?
- WordPress Custom Query
- Help altering a query to exclude all but standard post format
- How to limit search to first letter of title?
- Post Title displaying but not in the wrapped HTML I need
- Two posts in same div – WP loop
- How to ensure that is_search() return false after query_posts
- Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- ‘category__and’ for custom taxonomy?
- Query 1 taxonomy term, exclude another
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Exclude first 2 posts with meta_key from loop
- Pagination on custom query
- Ordering terms before displaying posts
- Sort Posts by Multiple Meta Values [duplicate]
- Querying posts with meta value that begins with a certain pattern
- Output 2 items within the Loop
- Adding Variables to post query
- Unable To Get Published posts using query_posts
- the_content() seems to block my ACF-code
- Read More is not working in query posts
- How to insert content from another Custom Post type into Post?
- How to reverse the order of WordPress blog posts?
- Removing the_content() from the page
- Trouble with get_next_post() get_previous_post() returning null
- popular post weekly and monthly
- Multiple loops without repeating content
- Possible to display posts containing a short code ?
- Display all posts that were published before full post on single.php
- How to run a SQL Query for character in Post Titles
- Authors List page : how to exclude posts from certain category
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- Duplicated posts on category page
- Query a WordPress page by its title (which has a parent page)
- query_posts() vs get_posts() multiple loops [duplicate]
- Order by category titles
- post_parent array doesn’t work
- How to get post ID in a Page?
- 3 random images from custom post type, each in a div with a diffrent class
- How to place an image after Nth number of posts in query_posts
- Related Posts: Notice: Undefined offset: 0
- Can’t get pagination to work for sticky posts only
- show x number of posts from y category on homepage
- How to Show Comment Count on Related Posts?
- How can I show only 5 posts from the relationship?
- Loop through custom taxanomy in post and display custom fields from posts
- How is WordPress changing the content markup?
- Make query_post category name dynamic
- How can I list posts with different formats depending on order?
- query_posts orderby postmeta [closed]
- WordPress Query based on random taxonomy
- Displaying and Querying Posts with Featured image
- View Achive with Category Filter, but Page per post not working
- grab neighboring content in a query
- Magazine style frontpage with multiple categories/loops and no duplicate posts
- Is there any way of only retrieving posts with one or more thumbs up (GD star rating plugin)?
- How to put orderby on a custom field in query_posts
- wp_remote_post and form post
- Filter posts by current date ( WP Post Carousel )
- the_content() keeps repeating itself
- display news with pictures 3 small and one large (loop)
- Sort Posts By Custom Field Date
- Custom query posts error
- Have multiple loops on a page appear after/between page content
- wp_query by last month + sort posts
- Post Filter clearing on pagination $_post
- How to limit the number of posts on the home page?
- Creating mixture of shortcodes to use in the visual/text editor
- Show number of posts AND number on current page (cannot make it work)