• Hi there, anyone the who using Arcade basic . Im seeking code or any plugin in that can make my post at homepage more than 4 ? I have been trying several code..It doesnt change my homepage post. Only 4 displayed…

    Even I tried Plugin custom post per page that work for most people doesnt work for page too …

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chriszchyn

    (@chriszchyn)

    It seems a lot of people (including me) are looking for a way or some code to modify this.

    Hopefully we’ll get some help soon . . . .

    hi guys i got it!
    Use Jetpack and check infinity scroll…
    look at my page: https://globetourists.ch

    Hi all. Another way (infinite scroll is good, but a quick way) is to open “themes/arcade-basic/functions.php” and find the following block of text…

    function bavotasan_home_page_query( $query ) {
            if ( $query->is_home() && $query->is_main_query() ) {
                    $blog_post_page = get_option('page_for_posts');
                    if ( ! empty( $blog_post_page ) && get_queried_object_id() == $blog_post_page )
                            return;
    
                    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
                    $per_page = get_option( 'posts_per_page' );
                    $offset = ( 1 < $paged ) ? ( 10 * ( $paged - 1 ) + 4 ) - $per_page : 0;
                    $show = ( 0 == $offset ) ? 4 : $per_page;

    See the bits that say “4” above? Change those to the number you want. In my case it’s 20. 20 posts per page, then an offset of 20 so that it shows another 20 on the next page. Like this..

    function bavotasan_home_page_query( $query ) {
            if ( $query->is_home() && $query->is_main_query() ) {
                    $blog_post_page = get_option('page_for_posts');
                    if ( ! empty( $blog_post_page ) && get_queried_object_id() == $blog_post_page )
                            return;
    
                    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
                    $per_page = get_option( 'posts_per_page' );
                    $offset = ( 1 < $paged ) ? ( 10 * ( $paged - 1 ) + 20 ) - $per_page : 0;
                    $show = ( 0 == $offset ) ? 20 : $per_page;
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘More than 4 post per page @ homepage’ is closed to new replies.