Redirect an admin user role on login with login redirect

You can redirect a user based on their WordPress role with the login_redirect filter. add_filter( ‘login_redirect’, ‘themeprefix_login_redirect’, 10, 3 ); /** * Redirect user after successful login. * * @param string $redirect_to URL to redirect to. * @param string $request…
Hide the Description and Reviews Tabs in WooCommerce Products

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…
Add qty inputs next to add to cart button with and without Ajax reload on WooCommerce archives

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…
Disable Lazy Loading in WordPress with a filter

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…
Add a ‘Continue Shopping’ Button to Woo Commerce Checkout and Cart Page

By default WooCommerce Cart page does not have a ‘Continue Shopping’ or ‘Return to Store’ button. However if you go to the cart page when the cart is empty, there is a ‘Return to Store’ button. We just need to add…
Apple Minimum System Requirements for macOS BIg Sur 11 – Is yours good enough?

Find out if your Apple computer meets the minimum system requirements of the latest macOS Big Sur 11. Apple have released their latest operating system in June 2020 and named it macOS Big Sur, which will be version macOS 11.…
Add WooCommerce add to cart button and quantity field to Shop archive page

Here is how you can add WooCommerce add to cart button and quantity field/form to Shop archive page. You may have just a bunch of linked products on the shop page but want to add a quicker way for a…
Stop WooCommerce taking over lost password URL

When you have WooCommerce installed, it hijacks the lost password URL with /my-account/lost-password/ you can revert to the original WordPress lost password URL by removing a filter to your themes functions.php file /** * Remove WooCommerce /my-account/lost-password so default WordPress…
Add an Alpha RGBa Color Picker to a WordPress Plugin Input Field

WordPress uses the Iris Color Picker as a tool which you can select a color for an input field in a plugin or theme or customizer, out of the box you can only add a hex color and not an…
Change @WordPress from email address and from name sent out from website

WordPress sends a few emails out from a website including password reset emails that have a from email address wordpress@yoursite.com they also have a from name of WordPress. Two WordPress filters can change these values wp_mail_from and wp_mail_from_name – add…