Skip to main content

I am building a WordPress website and I want to show post in it. But the problem is that, I want to exclude the first post in query. I have not much knowledge of PHP. So please help me to de this. This is the basic code that The theme is using;

  <?php
                        $blog_args = array(
                            'post_type' => 'post',
                            'posts_per_page'    => 8
                        );
                        $blog_posts = new WP_Query($blog_args);
                        while($blog_posts->have_posts()) {
                            $blog_posts->the_post();
                    ?><?php } ?>
    <?php wp_reset_postdata(); ?>
<?php
$blog_args = array(
    'post_type'      => 'post',
    'posts_per_page' => 8
);

$blog_posts = new WP_Query( $blog_args );

while ( $blog_posts->have_posts() ) {
    $blog_posts->the_post();
}

wp_reset_postdata();

Please help me to do this

I am building a WordPress website and I want to show post in it. But the problem is that, I want to exclude the first post in query. I have not much knowledge of PHP. So please help me to de this. This is the basic code that The theme is using;

  <?php
                        $blog_args = array(
                            'post_type' => 'post',
                            'posts_per_page'    => 8
                        );
                        $blog_posts = new WP_Query($blog_args);
                        while($blog_posts->have_posts()) {
                            $blog_posts->the_post();
                    ?><?php } ?>
    <?php wp_reset_postdata(); ?>

Please help me to do this

I am building a WordPress website and I want to show post in it. But the problem is that, I want to exclude the first post in query. I have not much knowledge of PHP. So please help me to de this. This is the basic code that The theme is using;

<?php
$blog_args = array(
    'post_type'      => 'post',
    'posts_per_page' => 8
);

$blog_posts = new WP_Query( $blog_args );

while ( $blog_posts->have_posts() ) {
    $blog_posts->the_post();
}

wp_reset_postdata();

Please help me to do this

Source Link

Exclude first post from wp query

I am building a WordPress website and I want to show post in it. But the problem is that, I want to exclude the first post in query. I have not much knowledge of PHP. So please help me to de this. This is the basic code that The theme is using;

  <?php
                        $blog_args = array(
                            'post_type' => 'post',
                            'posts_per_page'    => 8
                        );
                        $blog_posts = new WP_Query($blog_args);
                        while($blog_posts->have_posts()) {
                            $blog_posts->the_post();
                    ?><?php } ?>
    <?php wp_reset_postdata(); ?>

Please help me to do this