Support » Theme: Storefront » Featured Products Sorting

  • lfirth

    (@lfirth)


    I have added the following filter to my functions file to try and get the front page featured products to sort as I sort them in the admin “Products” but it doesn’t seem to sort correctly.

    // change the number of featured products displayed
    add_filter( ‘storefront_featured_products_args’, ‘fww_storefront_featured_products’, 199 );

    function fww_storefront_featured_products( $args ) {
    $args[‘limit’] = 8;
    $args[‘columns’] = 4;
    $args[‘orderby’] = ‘menu_order’;
    $args[‘order’] = ‘asc’;

    return $args;
    }

    • This topic was modified 3 years ago by lfirth.
  • The topic ‘Featured Products Sorting’ is closed to new replies.