Add code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. Use the following code to change the number of WooCommerce products displayed per page. […]
Tag: genesis themes wordpress
Send coupons used in an order by email
Posted on — Leave a commentThis snippet sends by email the list of coupons used in an order. You can customize the “$to” variable and define your own email address, and the “$message” to have your own text. Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. […]
Allow shortcodes in product excerpts
Posted on — Leave a commentAdd code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. /** * Allow shortcodes in product excerpts */ if (!function_exists(‘woocommerce_template_single_excerpt’)) { function woocommerce_template_single_excerpt( […]
Configuring Zeus Server Rewrite Rules
Posted on — Leave a commentThis rewrite.script has been configured for WordPress: RULE_0_START: # get the document root map path into SCRATCH:DOCROOT from / # initialize our variables set SCRATCH:ORIG_URL = %{URL} set SCRATCH:REQUEST_URI = %{URL} # see if there are any queries in our URL match URL into $ with ^(.*)\?(.*)$ if matched then set SCRATCH:REQUEST_URI = $1 set […]
Add a custom currency / symbol
Posted on — Leave a commentAdd this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. /** * Custom currency and currency symbol */ add_filter( ‘woocommerce_currencies’, ‘add_my_currency’ […]
Minimum Order Amount
Posted on — Leave a commentAdd code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. /** * Set a minimum order amount for checkout */ add_action( ‘woocommerce_checkout_process’, ‘wc_minimum_order_amount’ […]