Welcome to WP Beaches

WordPress Websites design specialists, based in the Northern Beaches, Sydney
Design, Develop, Host

RECENT POSTS

Add a menu to WordPress page with PHP action hooks

Add WordPress Menu Php

Adding a menu to WordPress via PHP and action hooks requires three steps, registering the menu location, assigning a menu to it and then placing the menu with an action hook. Register WordPress Menu Registering a menu is done with register_nav_menu, below is an example to register a ‘Store Menu’ menu. add_action( ‘init’, ‘wpb_custom_new_menu’ );…

How to turn off Auto-correct on macOS Big Sur for all applications

Macos Autocorrect Disabled

Auto-correct seems to be enabled by default in some macOS computers which can be a pain especially in Mail, and any application which you are typing a lot and simply don’t need it. Here is how to turn off auto-correct for macOS applications. Put a stop to It Globally Go to the Apple Menu >…

Change WooCommerce SKU text to another label

Woocommerce Sku Label.peg

You can change WooCommerce SKU text to another label using the gettext filter add_filter(‘gettext’, ‘translate_woocommerce’, 10, 3); /** * Change SKU Label * @link https://gist.github.com/dannyconnolly/da6f1a2d95dc826ccdcd * @since 1.0.0 */ function translate_woocommerce($translation, $text, $domain) { if ($domain == ‘woocommerce’) { switch ($text) { case ‘SKU’: $translation = ‘Catalogue No:’; break; case ‘SKU:’: $translation = ‘Catalogue No:’;…

Show only free shipping option on WooCommerce cart and checkout pages

Woocommerce Free Shipping Option

By default WooCommerce will show all available shipping options on cart and checkout pages, if you have free shipping as an option you may just want that displayed by itself. The code snippet below which needs to be added to your functions.php theme file will do just that… add_filter( ‘woocommerce_package_rates’, ‘prefix_hide_shipping_when_free_is_available’, 100 ); /** *…

Filter WooCommerce orders by payment gateway

Filter Woo Commerce Payment Gateway

Here is how you can filter WooCommerce orders by payment gateway in the WordPress dashboard orders screen using a plugin from SkyVerge. Add the php file directly or in a folder in the /wp-content/plugins/ directory and then activate the plugin from the WordPress dashboard. Now you will see a column that allows you to choose…

Hide the Description and Reviews Tabs in WooCommerce Products

hide-woocommerce-tabs

WooCommerce products by default show  ‘description‘ and ‘reviews‘ tabs below the product on a WordPress product page, you can hide these tabs from view as well as a third tab ‘additional information‘ with a snippet of code that goes in your themes functions.php file   As well as remove the tabs you can rename the heading…

Add qty inputs next to add to cart button with and without Ajax reload on WooCommerce archives

Ajax Reload Woocommerce Qty Cart

Here is how you can add qty inputs next to add to cart with Ajax reload on WooCommerce archives. Without Ajax Reload add_filter( ‘woocommerce_loop_add_to_cart_link’, ‘quantity_inputs_for_woocommerce_loop_add_to_cart_link’, 10, 2 ); /** * Override loop template and show quantities next to add to cart buttons * @link https://gist.github.com/mikejolley/2793710 */ function quantity_inputs_for_woocommerce_loop_add_to_cart_link( $html, $product ) { if ( is_user_logged_in()…

Disable Lazy Loading in WordPress with a filter

Disable Lazy Load WordPress

Since WordPress 5.5, lazy loading for images was implemented, this improves the perception of page load as the image is only loaded once in the viewport window. You may not light it as it can have a jarring effect as the sudden load as you scroll or find that you have a clash with another…