PHP code example of inpsyde / top-selling-products
1. Go to this page and download the library: Download inpsyde/top-selling-products library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
inpsyde / top-selling-products example snippets
add_filter( 'inpsyde_top_selling_products.query_args' , function( array $args ) {
// Randomize the results, but exclude posts with specific IDs.
return array_merge( $args, [
'post__not_in' => [ 4, 8, 15, 16, 23, 42 ],
'orderby' => 'rand',
] );
} );