You need 2 queries e.g.
$query1 = new WP_Query( 'post_type=post&posts_per_page=1' );
// The Loop
while ( $query1->have_posts() ) {
$query1->the_post();
echo '<li>' . get_the_title() . '</li>';
}
wp_reset_postdata();
$query2 = new WP_Query( 'post_type=post&posts_per_page=100&offset=1' );
while( $query2->have_posts() ) {
$query2->next_post();
echo '<li>' . get_the_title( $query2->post->ID ) . '</li>';
}
wp_reset_postdata();
The first query gets the first post (which you can then do what you want) and the second query gets the rest of the posts but skips the first post (from the first query) using the offset tag.
Related Posts:
- Querying post from a multisite network
- How to hide a post from ‘Recent Posts’ widget?
- How to get most recent commented post above new submitted post in WordPress?
- Two posts are loaded instead of one?
- How to start with post number x?
- Display most recent post on homepage?
- recent posts for different categories
- WP Bakery Load More Button loads the same posts
- How to get date of post when using wp_get_recent_posts()?
- Latest posts by category — how to exclude current post?
- Add hero image to home page (blog format) via the dashboard
- Why aren’t paragraphs breaking on this page?
- Get x recent posts by author?
- Showing recent post of category in page
- How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?
- Change Posts per page count
- Random sort within an already sorted query
- Can I force a metabox to be in one column?
- Search by Hyphen
- Display the latest post from a category in a page
- rewind_posts() – what actually the use of it, and where using is required or preferred?
- Post publish only hook?
- Restrict access to post if it is currently being edited
- Query only Posts from Both of Two Category?
- wp_update_term is always launched after wp_insert_term
- Exclude posts with specific meta_value while sorting by a separate meta_value
- Problem ordering posts with numbers for titles numerically E.g. 1, 10, 100
- why does HTML Tag not working in Post and Page
- Post in Multiple Categories to stay in current category (permalink, next previous post link)
- Undefined variable post_id in custom quick edit coloumn
- Post preview and oembed provider issue using polylang plugin with subdomains
- Posts are being redirected to xampp home page
- How would I get 1 latest post from a query for 5 posts?
- How can I link a CSS file only on single posts?
- How can I create custom button in post.php
- Exclude posts with empty post_content in wp_query
- Exclude posts from featuring
- Diplay comment date on WP_Post_Comments_List_Table
- Enable post revisions for a specific post
- Can I lock a post in position, so it always appears on the homepage?
- Custom post preview without saving
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- get_the_excerpt() is not working as expected – returns wrong text
- Category Page Template not Showing Posts
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Select only post id and meta value with WP_Query
- Recent posts and first featured
- Cannot retrieve a custom RSS field from posts
- How to get a post’s details by shortcode?
- Get the amount of posts on a current page
- update image path with words starting uppercase to lowercase chars
- Posts on a Page using functions.php
- Make insterted image point to post url instead of attachment page
- WordPress bulk category select when publishing post
- Why is my custom template not showing anything?
- How to populate a select field with post titles/ids in a block
- $_GET parametters not working in an specific template
- How to add html code at the bottom of the post in archive page?
- How to get all inline images in post content? [duplicate]
- What function publishes a post when you click the publish button?
- Email notification of new post includes code
- Link post images to post
- Rewriting blog permalinks
- How to exclude native lazy loading from first image in post content?
- Count the total views of all user posts published
- Why sorting posts doesn’t work properly?
- How can I create a shortcode to show the number of posts of actual day?
- WordPress 5: prevent link from displaying page title instead of URL
- Post title links appear to be broken
- the wp_post_update isn’t working all the time
- Post title not displaying as recorded in the wp_posts table
- Customizing a new page used for blog posts with Avada theme
- How to increase the number posts that displays by a hierarchical taxonomy? (HTTP ERROR 500)
- post is not showing more than 3949 words
- Word /blog/ in slug post, problems in CPT. Solutions?
- How to add post under particular pages? Like website.com/page1/post1
- Repeating post how to solve this
- Showing content from WordPress ruins page CSS using WP_Query, without, content does not show
- How to Test a Blog Post for Update vs. Publish Status — Unique
- Show a Category Specific Info Box
- Inserting image into post content – Front End
- Overwrite URL on blog posts
- post content includes and seo vs. duplicate content
- Posts don’t appear on the Blog page
- Display the first post’s comments of category in comments.php template
- Insert link to my thumbnail images
- Commenting on a post from the admin panel?
- How to filter categories of a post
- Columns in a “post”
- On the post list, how do you show different text to the main content?
- Showing Unpublished Posts to Logged-out Users?
- How do I add /blog/ on my permalink without affecting the portfolio project types permalink?
- Need All the posts with id, title and date [closed]
- List posts related to category on a div [closed]
- Ajax calls in wordpress
- Adding a content rating system
- How to get only post=’product’
- unable to select “fullwidth” on the POST (not page)
- How to get post ID after removing that post?
- I cannot see the pagination in /wp-admin posts page