Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Merv Barrett

    (@mervb1)

    You can control the number of posts displayed from Dashboard > Settings > Reading > Blog pages show at most.

    Or you can use the WordPress pre_get_posts filter to alter the count based on the property post type.

    See Changing the number of posts per page, by post type

    Plugin Author Merv Barrett

    (@mervb1)

    EG:

    function my_property_pagesize( $query ) {
        if ( is_admin() || ! $query->is_main_query() )
            return;
        if ( is_post_type_archive( 'property' ) ) {
            // Display 12 posts for a custom post type called 'property'
            $query->set( 'posts_per_page', 12 );
            return;
        }
    }
    add_action( 'pre_get_posts', 'my_property_pagesize', 1 );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set how many listings show per page’ is closed to new replies.