Why Your WordPress Site Needs a Better Mobile Menu
A better mobile menu presents a better site experience all round. If you want to convert more visitors on mobile devices, you need to make sure you have a decent mobile menu.

Categorised: WordPress guides
Posted by aaron. Last updated: November 5, 2025

Here is a snippet of code to your child theme’s functions.php file or via a plugin that allows custom functions to be added. Do not add this custom code directly to your parent theme’s functions.php file as this will be removed when you update the theme.
add_action( 'woocommerce_cart_calculate_fees', 'toast_woocommerce_custom_fee' );
function toast_woocommerce_custom_fee() {
global $woocommerce;if (is_admin() && ! defined( 'DOING_AJAX' ) )
return;
$percentage = 0.05;
$fee = ( $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total ) * $percentage;
$woocommerce->cart->add_fee( 'Fee', $fee, true, '' );
}
add_action( 'woocommerce_cart_calculate_fees', 'toast_woocommerce_custom_fee' );
function toast_woocommerce_custom_fee() {
global $woocommerce;if (is_admin() && ! defined( 'DOING_AJAX' ) )
return;
$fee = 5;
$woocommerce->cart->add_fee( 'Fee', $fee, true, '' );
}
add_action( 'woocommerce_cart_calculate_fees', 'toast_woocommerce_custom_discount' );
function toast_woocommerce_custom_discount() {
global $woocommerce;if (is_admin() && ! defined( 'DOING_AJAX' ) )
return;
$percentage = 0.5;
$discount = -( $woocommerce->cart->cart_contents_total + $woocommerce->cart->shipping_total ) * $percentage;
$woocommerce->cart->add_fee( 'Discount', $discount, true, '');
}
A better mobile menu presents a better site experience all round. If you want to convert more visitors on mobile devices, you need to make sure you have a decent mobile menu.
Here is a snippet of code to your child theme’s functions.php file or via a plugin that allows custom functions…
How to add a stylesheet to your WordPress login screen Adding a stylesheet to your wp-login.php screen gives you a…