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 customer to add products to cart. Depending on your WordPress theme the add to…
Read MoreStop 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 one can be used */ remove_filter( ‘lostpassword_url’, ‘wc_lostpassword_url’, 10 ); Now the default lost password…
Read MoreAdd 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 Alpha RGBa color type that supports transparency. There are a couple of ways around this…
Read MoreChange @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 [email protected] they also have a from name of WordPress. Two WordPress filters can change these values wp_mail_from and wp_mail_from_name – add the below code in your child themes functions.php and change the appropriate values. add_filter(‘wp_mail_from’, ‘prefix_email_from’);…
Read MoreMaking A Boot USB Disk of macOS 10.9 – 10.15 via Terminal and GUI
This guide deals with 3 ways of making a boot disk from macOS, the first one is the fastest and is done via the Terminal from a command in macOS called createinstallmedia, the other 2 are older ways are done with a mixture of finder using Disk Utility and command line. The first way can support…
Read MoreToggle Bootstrap Off Canvas Content Panels with Buttons
Utilising a Bootstrap 4 WordPress theme – below code snippets to toggle off-canvas content. For multiple panels of content the trigger button data attribute – data-trigger needs a unique value that matches its content panel in the case below it is the article element which has the matching id value. HTML <b class=”screen-overlay”></b> <button data-trigger=”#card_mobile”…
Read MoreOutput WordPress Custom Query Posts Loop in Bootstrap Modals
Here is some code to output a custom loop via Shortcode that will display a posts full content in a Bootstrap Modal without linking back to the single post page. This is done on a WordPress theme that has the Bootstrap framework already loaded. A new loop is created only showing the post title and…
Read MoreChange ‘Return To Store’ text button in WooCommerce
WooCommerce version 2.6 has brought out a new text filter that lets you change the text of ‘Return To Store’ on the button that appears on the cart page when the cart is empty. The filter is called woocommerce_return_to_shop_text and this is how you can use it. add_filter(‘woocommerce_return_to_shop_text’, ‘prefix_store_button’); /** * Change ‘Return to Shop’…
Read MoreCreate a WooCommerce Featured Products Loop of Featured Images
Here is a guide on how to create a WooCommerce featured products loop of featured images. The featured product option is chosen from the star column in the WordPress dashboard backend of the WooCommerce products, ‘featured‘ it is a term that belongs to the taxonomy named ‘product_visibility‘. View the code on Gist. So…
Read MoreCreate a slider of WooCommerce Product Featured Images
Here is how you can create a slider of WooCommerce product featured images using a jQuery slider. There are many slider scripts you can use, this one uses Slick Center Mode, this one from Slick adds a CSS class on the center image by which you can target with CSS and add in transition and…
Read More