Support » Plugin: WooCommerce Products Per Page » Divi fix limits library media view

  • Resolved profoundworks


    Hello, your fix for the Divi theme:

    dd_action( ‘pre_get_posts’, ‘wppp_extra_filter’, 30 );
    function wppp_extra_filter( $query = false ) {
    $query->set( ‘posts_per_page’, apply_filters( ‘loop_shop_per_page’, 12 ) );

    seem to also limit the amount of items returned from the media library (only shows 12 in grid view).
    I can get them all if i switch to list view then search for which item i need but this still is a big inconvenience to our client.

    Do you know if there is another way to fix this for divi that allows the media library grid view to remain functional?

    Cheers! otherwise nice plugin 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeroen Sormani



    A couple things you can try here; Either change the ’12’ to something like ‘get_option('posts_per_page'), but not sure if that will do the trick.

    Or add some additional checks to ensure its only on the front-end / WC pages before setting the variable.

    Please do note that this is custom coding and I can’t provide full support on those kinds of things.

    Have a great day!
    Jeroen Sormani



    Thanks for you reply, you are correct that the get_option will not work, that will just return 10 (woocommerce default).

    BUT You pointed me in the right direction, added a is_admin() condition fixed it 🙂


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Divi fix limits library media view’ is closed to new replies.