Display posts from #6 to #20 on archive page

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite












My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20.



How can I do this?










share|improve this question









New contributor




JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    up vote
    1
    down vote

    favorite












    My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20.



    How can I do this?










    share|improve this question









    New contributor




    JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20.



      How can I do this?










      share|improve this question









      New contributor




      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      My client shows his 5 most recent posts (excerpts) on the homepage followed by a "read more" link. On archive page he does not want to display the 5 most recent post again but posts from #6 to #20.



      How can I do this?







      posts archives order






      share|improve this question









      New contributor




      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 12 mins ago









      Varsha Dhadge

      437




      437






      New contributor




      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 1 hour ago









      JDRay

      61




      61




      New contributor




      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      JDRay is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          Add offset in the query and give value as 5 so, the first 5 will be skipped.



          Below is code snippet for the same



          $custom_args = array('post_type' => 'your custom post type name',
          'posts_per_page' => '20',
          'orderby' => 'id',
          'offset'=>5,
          'order' => 'ASC',);
          $custom_query = get_posts($custom_args);
          foreach ($custom_query as $value)
          //your data






          share|improve this answer






















          • This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
            – Michael
            1 hour ago

















          up vote
          1
          down vote













          You can filter the original archive query:



          function my_archive_query( $query ) 
          if ( $query->is_archive() && $query->is_main_query() )
          $query->set( 'offset', 5 );
          $query->set( 'posts_per_page', 20 );



          add_action( 'pre_get_posts', 'my_archive_query' );


          More info:



          pre_get_posts filter



          is_archive conditional tag






          share|improve this answer








          New contributor




          Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "110"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            JDRay is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f314595%2fdisplay-posts-from-6-to-20-on-archive-page%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            Add offset in the query and give value as 5 so, the first 5 will be skipped.



            Below is code snippet for the same



            $custom_args = array('post_type' => 'your custom post type name',
            'posts_per_page' => '20',
            'orderby' => 'id',
            'offset'=>5,
            'order' => 'ASC',);
            $custom_query = get_posts($custom_args);
            foreach ($custom_query as $value)
            //your data






            share|improve this answer






















            • This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
              – Michael
              1 hour ago














            up vote
            2
            down vote













            Add offset in the query and give value as 5 so, the first 5 will be skipped.



            Below is code snippet for the same



            $custom_args = array('post_type' => 'your custom post type name',
            'posts_per_page' => '20',
            'orderby' => 'id',
            'offset'=>5,
            'order' => 'ASC',);
            $custom_query = get_posts($custom_args);
            foreach ($custom_query as $value)
            //your data






            share|improve this answer






















            • This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
              – Michael
              1 hour ago












            up vote
            2
            down vote










            up vote
            2
            down vote









            Add offset in the query and give value as 5 so, the first 5 will be skipped.



            Below is code snippet for the same



            $custom_args = array('post_type' => 'your custom post type name',
            'posts_per_page' => '20',
            'orderby' => 'id',
            'offset'=>5,
            'order' => 'ASC',);
            $custom_query = get_posts($custom_args);
            foreach ($custom_query as $value)
            //your data






            share|improve this answer














            Add offset in the query and give value as 5 so, the first 5 will be skipped.



            Below is code snippet for the same



            $custom_args = array('post_type' => 'your custom post type name',
            'posts_per_page' => '20',
            'orderby' => 'id',
            'offset'=>5,
            'order' => 'ASC',);
            $custom_query = get_posts($custom_args);
            foreach ($custom_query as $value)
            //your data







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 1 hour ago

























            answered 1 hour ago









            Adarsh

            619




            619











            • This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
              – Michael
              1 hour ago
















            • This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
              – Michael
              1 hour ago















            This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
            – Michael
            1 hour ago




            This means you run a second query after the original archive query. It's better to filter the original query with pre_get_posts or similar.
            – Michael
            1 hour ago












            up vote
            1
            down vote













            You can filter the original archive query:



            function my_archive_query( $query ) 
            if ( $query->is_archive() && $query->is_main_query() )
            $query->set( 'offset', 5 );
            $query->set( 'posts_per_page', 20 );



            add_action( 'pre_get_posts', 'my_archive_query' );


            More info:



            pre_get_posts filter



            is_archive conditional tag






            share|improve this answer








            New contributor




            Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





















              up vote
              1
              down vote













              You can filter the original archive query:



              function my_archive_query( $query ) 
              if ( $query->is_archive() && $query->is_main_query() )
              $query->set( 'offset', 5 );
              $query->set( 'posts_per_page', 20 );



              add_action( 'pre_get_posts', 'my_archive_query' );


              More info:



              pre_get_posts filter



              is_archive conditional tag






              share|improve this answer








              New contributor




              Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.



















                up vote
                1
                down vote










                up vote
                1
                down vote









                You can filter the original archive query:



                function my_archive_query( $query ) 
                if ( $query->is_archive() && $query->is_main_query() )
                $query->set( 'offset', 5 );
                $query->set( 'posts_per_page', 20 );



                add_action( 'pre_get_posts', 'my_archive_query' );


                More info:



                pre_get_posts filter



                is_archive conditional tag






                share|improve this answer








                New contributor




                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                You can filter the original archive query:



                function my_archive_query( $query ) 
                if ( $query->is_archive() && $query->is_main_query() )
                $query->set( 'offset', 5 );
                $query->set( 'posts_per_page', 20 );



                add_action( 'pre_get_posts', 'my_archive_query' );


                More info:



                pre_get_posts filter



                is_archive conditional tag







                share|improve this answer








                New contributor




                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                share|improve this answer



                share|improve this answer






                New contributor




                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 1 hour ago









                Michael

                873




                873




                New contributor




                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Michael is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.




















                    JDRay is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    JDRay is a new contributor. Be nice, and check out our Code of Conduct.












                    JDRay is a new contributor. Be nice, and check out our Code of Conduct.











                    JDRay is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fwordpress.stackexchange.com%2fquestions%2f314595%2fdisplay-posts-from-6-to-20-on-archive-page%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery