shopp_category_sortoptions

filters array of category sort options used for building menu on storefront.

add_filter( 'shopp_category_sortoptions', [callback] )

@param array $sortoptions array of category sort options used for building menu on storefront.

Description

filters array of category sort options used for building menu on storefront.

Example

// register filter callback
add_filter('shopp_category_sortoptions', 'my_sort_options_filter');

// create filter function
function my_sort_options_filter( $sortoptions ) {
    // remove "Bestselling" sort option
    foreach ( $sortoptions as $value => $label ) {
        if ( $value == 'bestselling' ) unset($sortoptions[$value]);
    }
    return $sortoptions;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar