Forums Forums Search & Filter Pro Results per page won't update/not working

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #227259

    Hello,

    We are having an issue with the “Results per page:” setting on the general tab not updating the number of search results per page. We seem to be stuck at 5 search results per page: Courses Archive Search Results Page

    I also tried resetting the results per page with the pre_get_posts action to no avail. Here’s that code:
    `
    // Set Posts per page
    function wpd_courses_query( $query ){
    if( ! is_admin()
    && $query->is_post_type_archive( ‘courses’ )
    && $query->is_main_query() ){
    $query->set( ‘posts_per_page’, 10 );
    }
    }
    add_action( ‘pre_get_posts’, ‘wpd_courses_query’ );
    `

    Any help would be much appreciated.

    Trevor
    #227351
    This reply has been marked as private.
    Anonymous
    #227442
    This reply has been marked as private.
    Anonymous
    #227444
    This reply has been marked as private.
    Trevor
    #227687
    This reply has been marked as private.
    Anonymous
    #227722
    This reply has been marked as private.
    Trevor
    #227817

    As you say, something very odd. I will wait to hear back from you.

    Anonymous
    #228290
    This reply has been marked as private.
    Trevor
    #228332

    So, I can deduce that something is setting this 5 posts per page, and it is not the standard WordPress setting (in the Reading options in settings), nor our plugin.

    It will be one of these things:

    1. The theme. Via a theme function, a template file, or the functions.php file.
    2. Custom code
    3. Another plugin

    The only possible plugin I can see SROM Courses, I checked. It is not there.

    What happens if you switch the Divi parent theme?

    Anonymous
    #228390

    Ah, it is the Divi theme. Thank you, I didn’t even think to look there as I am not used to a theme setting that.

    I guess I will have to see if there is a way to override that with Divi as it is rather annoying that it sets it globally. Also that Search and Filter doesn’t override the setting. For now though, I will just set it through Divi.

    Thank you!

Viewing 10 posts - 1 through 10 (of 11 total)