Adding CSS styles into WooCommerce emails
WooCommerce emails can have CSS inline styles added via an action hook woocommerce_email_header, to add your CSS styles use the hook like below… add_action( ‘woocommerce_email_header’, ‘bt_add_css_to_email’ ); /** * WooCommerce * Add inline CSS to emails sent out */ function bt_add_css_to_email() { echo ‘ <style type=”text/css”> h1 { text-align: center !important; color: #c7c9c7; } </style></pre>…
Read MoreMake price in WooCommerce an absolute value
You can make the prices displayed in WooCommerce an absolute value and remove the decimal .00 places with the WooCommerce woocommerce_price_trim_zeros filter. So for example to go from $50.00 to $50 In your functions.php add the following… /** * WooCommerce * Trim zeros in price decimals **/ add_filter( ‘woocommerce_price_trim_zeros’, ‘__return_true’ );
Read MoreChange the WooCommerce return to shop and continue shopping URLs
You can change the WooCommerce shop URL with a filter that WooCommerce provides, this can be helpful especially if you have a one product based shop and you want your users to return to that product and not the default shop page URL. The filter to use is aptly named – woocommerce_return_to_shop_redirect – add in your…
Read MoreRemove WordPress site health dashboard and menu item
You can remove the WordPress site health dashboard widget and menu item with the following snippets Remove Site Health Dashboard Widget add_action(‘wp_dashboard_setup’, ‘themeprefix_remove_dashboard_widget’ ); /** * Remove Site Health Dashboard Widget * */ function themeprefix_remove_dashboard_widget() { remove_meta_box( ‘dashboard_site_health’, ‘dashboard’, ‘normal’ ); } Remove Site Health Menu Item add_action( ‘admin_menu’, ‘remove_site_health_menu’ ); /** * Remove Site…
Read MoreGetting your Bootstrap Popover Popper going on in Beaver Theme
Bootstrap Popover is a nifty little tool like a tool tip function that displays more text like clicking on the button below. Show me the popover Set up the javascript files Careful of the names we are talking about Popovers but we need a Popper JS file…. Get popper.min.js Create a popover-init.js file with the…
Read MoreGet Beaver Theme Customizer Setting Values
You can get the value of Beaver Theme customizer settings values with FLTheme::get_setting which is similar to the get_theme_mod function, it works like so. FLTheme::get_setting( ‘fl-body-font-family’ ); So in the above, the font value is got from the Customizer > General > Text > Font Family Assign it to a variable and var_dump it out…
Read MoreAdd Search & Filter Pro Filters In Off-Canvas Menu
Adding the Search & Filter Pro filters in an off-canvas menu can be a better user experience on mobile devices. This guide uses UABBs Off-Canvas Module with a WooCommerce main shop page built in Beaver Themer. With a desktop/tablet layout already in place, this example uses a 2-column layout, WooCommerce shop page on the right…
Read MoreSet up WooCommerce shop page with Search and Filter Pro and Beaver Themer
Here is how you can set up the main WooCommerce shop page with Search and Filter Pro and Beaver Themer. The layout is to have the filter options on the left and products on the right, the filtering is using the product categories as well as a custom taxonomy. Search & Filter Pro In…
Read MoreHTML 5 Set Up Audio Across All Browsers using m4a, oga, mp3
HTML5 ‘Audio’ is a native tag in HTML 5 and plays the audio linked file in a browser without using a third party plugin such as Flash. Their are 3 formats that are used in HTML 5 Audio and are .mp3, .m4a AAC also known as H.264 format (which is the audio component of mp4)…
Read More