Calling the_post()
is what advances the internal current_post
counter that have_posts()
checks the value of within the loop.
With this in mind, you can call the_post()
once outside the loop and use any template tags you wish, then run the loop as normal and it will pick up and continue from the second post.
the_post();
// this is the first post!
the_title();
// now the loop
while ( have_posts() ) :
the_post();
// starts at 2nd post
the_title();
endwhile;
Related Posts:
- Multiple Loops Homepage?
- Why is it necessary to call rewind_posts() when using the loop more than once? [duplicate]
- Is including the loop necessary for page.php? [duplicate]
- Identify the page being shown while in The Loop
- How to find meta_values to call
- Alternate loop output every three posts (within the same original loop)
- Previous and Next Post link doesn’t work
- Sorting Woocommerce products with numeric titles [closed]
- loop not showing up when using a custom page template
- Random post, page inside post loop problem
- In a foreach loop, how do I target the last item in the loop?
- Using get_term() in functions.php results in Invalid taxonomy error
- Add Infinite Scroll to Ajax Loaded Category Query
- Users instead of posts: How to modify the main query?
- single page site with subpages
- Different Queries Return Same Results [closed]
- wordpress simple loop, huge issues
- Check to see if more than one post
- Pagination gives extra page with no results
- Style first 3 posts differently with a container, then the rest of the posts [closed]
- Loop through all posts in a certain year
- Loop after page content
- the_excerpt not showing posts
- add most viewed post by google analytic in loop [closed]
- Show the page title on blog page
- Query reset problem or flawed code to enable custom post type query
- Sort posts by most recently modified
- How can I make the loop not count special post formats towards the post count?
- How to show posts with multiple tags on tag.php?
- Exclude posts from main loop based on meta value
- Using an ACF field from a page within a post loop?
- trouble calling an import class from an action in a plugin before wp_cron executes
- Blog page Server error 500 with stick post loop in query.php
- How to fix pagination for custom loops?
- Show all posts using the template page and the loop?
- Why does `inclusive` not work in this wordpress loop?
- How do I automate multiple category loops?
- Multiple get_posts() queries on one page
- Custom loop not working
- Loop inside query
- Escape current post from loop
- Why isn’t my multiple loops working?
- How can I display other user avatars on an author profile page?
- something strange is happening to my code
- How to modify search.php to not show pages only show posts
- facebook like, tweet and google+1 buttons inside the loop on home, archive and search pages and missing facebook like buttons
- Loop Offset for tag based “Related Posts”
- Show articles in Pair
- Generating a perfect loop
- I have broke my pagination, same posts on all pages (index.php)
- I need to display all post in onepage
- Filter existing hook using parameter and foreach loop
- Run “the loop” in a random order
- WordPress loop not working only on home page, works on all other pages
- Exclude category from get_the_category
- Search page loop banner image issue
- Video post format, extra content breaks video embed
- Why is my category post repeating twice
- Adding a featured image to a foreach WordPress loop
- Hook to main query with filters based on custom fields
- Using has_tag() outside loop
- Why would a completely normal loop give offset errors and maximum execution time errors?
- Avoid WP_Query’s duplicate posts with taxonomies
- How to create multiple loop in archive page?
- Offset for Loop
- How can I change how my tag pages display?
- Properly loop through and paginate page on each function call
- Get a Post Loop based on Logged in User information into a Shortcode
- Loop keeps showing the same post even when I click on a different one
- Query users and count totals based on meta values
- php loop error for count posts in category
- Display all the terms within a custom taxonomy
- Submit form for loop of products of the term with AJAX
- Last post in loop when even
- Customizer settings using “for” loop
- Split Content and Gallery
- Adding comma to while loop wpquery output
- Repeat code, change variable?
- Foreach loop inside foreach loop?
- Ajax loop and history.js for SEO
- to get a little more content after ‘read more’ inside loop
- Show all child categories associated to post ID within loop
- Ajax category pagination problem
- Unable to login + Redirect loop on mobile
- Recent posts headlines. How to optimize the loop
- Running the Loop outside of WordPress
- Variable not working in sidebar loop
- Combine Query and Select Database to create directory loop
- My custom query not detecting the correct category
- 2 loops in blog homepage
- Change loop to display items in order
- wordpress showing all posts instead of date range
- Help with add_filter(‘the_content’, ‘some_function’) and multiple matches
- Loop doesn’t give the thumbnail the right parent (or class)
- the_content() “crashes” for single pages
- How to toggle a div element between two images when click two submit buttons in a wordpress loop?
- Best hook for a function which adds shortcodes to the system?
- Same posts within a paginated page
- Adding vkontakte social “like” button to posts results in multiple buttons on first post only
- Add static image block to lastest list item