You can do this using general programming/common sense with a variable and an if
statement, no WordPress knowledge is required.
If we create a variable named $skip_next
and set it to true
, then perform a check in the loop, we can set it to false and continue
to skip the first.
$skip_next = true;
while ( $blog_posts->have_posts() ) {
if ( $skip_next ) {
$skip_next = false;
continuel
}
$blog_posts->the_post();
Now because $skip_next
is false on the second post it will not be skipped
Related Posts:
- Build a content and excerpt grid loop with paging and options for # of posts
- how to display active, upcoming and past event with featured listing with pagination
- Exclude posts from homepage having a specified tag
- Can’t search posts using WP_QUERY inside AJAX Function
- WP_Query adds “(wp_posts.ID = ‘0’)” so no results are returned
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- How to get post ID in a Page?
- change the default order of posts only for specific categories
- Getting posts to exclude from array
- Get all posts as an array ID => Name
- Custom post type permalinks do not appear using the link functions
- posts_nav_link pulling in multiple post types
- Remove Post if Advanced Custom Field is checked to fix paging
- Toolbar Hidden in a Virtual Page
- Search.php gets metadata from first post
- search.php to search only the post title
- WordPress sorting posts by date and title using a dropdown
- Trying to get pagination working on WP_Query() post grid
- How to add thumbnails from recent posts to owl-carousel in wordpress automatically?
- Create a hierarchical loop at predefined markup requirements
- Custom query_posts() parameter
- Does wp_query and query_posts affect website performance? [duplicate]
- Pagination in category.php not functioning
- How to modify this function to exclude also the post belonging to a specific category?
- Variable ++ in query loop
- /page/2/ redirect to 404
- How do I exclude the current post from the upcoming post query
- How to determine if WP_DEBUG is enabled? [duplicate]
- Get author full name
- How to export/import theme customizer settings?
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- One button to change all settings in theme customizer?
- How to use copy() function and paste file in /wp-content/themes directory
- How can I add a class to a single menu item?
- Show different Customizer Settings on Page-Tamplates
- I think emoji are killing my WordPress site… How can I debug?
- Display Post co-authored in Author Page
- Am I not understanding plugins?
- Sorting Posts | Alphabetical Order
- Why is this Ajax not working?
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- Looking for most performant way to execute several similar WP queries within shortcodes
- Displaying theme options in css
- max_input_vars: how many am I using?
- Multiple WordPress Menus that will only display all pages
- Custom theme: Alternatives to long list of ‘include’ in functions.php
- How to show part of the_content?
- Hide categories that are not used in the post type
- WordPress, AJAX and pre_get_posts using conditional tags
- Menu jumping when calling it via PHP
- Remove echo from shortcode
- How Can I use WP_Query to Only Display 1 Post from Custom Post Type if Query Returns Posts with Matching ID in Custom Field
- Is there a way to conditionally check whether a WordPress post title is empty?
- Use WordPress function in php file
- Reset WordPress Post Query to default
- unable to use ‘new WP_Query’ in AJAX call
- Why in my theme I can’t see all the statics content under the posts?
- Double Curly Brackets in Php
- How to hide posts of a specific custom category in WordPress?
- WordPress WP_Query without query GET parameters
- How to add aria role and schema markup to custom walker container
- jQuery accordion menu
- Removed jQuery script from header.php , any problems?
- How to correctly load a different version of main menu based on the user language in WordPress? Is it a good solution?
- displaying a fall back query if there’s nothing in the post-type category
- Trying to change featured image from 180×180 to full width on home page
- Remove the Tag from wp_nav_menu
- Getting text from custom field from customizer
- WordPress navigation wont appear with wp_head
- Hot to check if new posts have been published since page load and notify online users?
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- Need help for some PHP code
- How do you get the current post taxonomy so I can get the current post taxonomy? into a variable to THEN loop through all post with that taxonomy.,
- wp_query with multiple arguments with AND
- Nested Queries of decreasing specificity
- Wrong pagination results, page counter resets when navigating
- Is it possible to order posts using multiple meta queries, i.e. show posts from first meta query, then the second?
- how to replace h1 entry title with h2 in category pages only
- in_array not working on dev server but works on localhost
- Problem with displaying CSS Stylesheets – Am I adding them correctly in my wordpress child theme?
- Define global custom post
- Display post date also if the date it’s the same for each post
- Submit remote form to wordpress REST API and save data to custom post type
- alternate left – right content inside the loop
- Add a custom link to each image in WordPress gallery
- register dependency css and js inside a plugin class
- Search for single post by 2 tags
- Collapsible menu on post sidebar only expands and does not collapse
- How to get php file based on URL in WordPress
- I want different post-thumbnail size depending on media size
- Div Missing In Custom Loop Query
- Create a custom theme-specific page, invisible in the admin-panel?
- WP_Query count of different meta key values [duplicate]
- Adding code to the function file
- Query specific posts per user selections from dropdown menus
- wp_query on search results page showing all results every time
- PHP warning: Undefined array key 2 in feed.php
- How do I run the following script from my articles page?
- Three different queries on same page
- Font Awesome Icons as squares [closed]