I had an idea to show all the different variation images for a product on the Shop page within WooCommerce. The goal was to show all the different colors available for a hat and other similar items on a client site. Showing just a single image didn’t seem to make it clear enough that there […]
May 18, 2022 | Code Snippets
I have been developing custom WordPress plugins for clients for many years. Even though there are so many great plugins in existence, they cannot all do exactly what your client needs and a custom plugin is required. Often several custom post types are created and, of course, metadata is saved for all of them. I […]
How to add your own custom class to Button blocks when using Lazy Blocks
When registering a sidebar, you can set the “before_widget” value to include some classes that WordPress will define. With Gutenberg, you can now use blocks in your sidebars – yay! However, that “before_widget” class by default does not include anything about the block that is used so it can be a challenge to custom style […]
Here on WPSunshine I use Easy Digital Downloads to sell my plugins. I do not allow customers to purchase multiples of the same plugin. I offer all Sunshine Photo Cart paying customers a free Confetti single site license via a discount code with a unique URL. However, clicking that URL multiple times meant someone could […]
Gravity Forms has a fancy List field that lets you do repeatable form fields. Then, using the “gform_column_input” filter, you can adjust your columns to be <select> (or drop-down) fields. We had a situation where the drop-down fields had a lot of options and using Gravity Forms enhanced UI to allow users to search all […]
With this small code snippet, a class is added to the <body> tag of your page once a Gravity Form has been submitted. I used this code so I could hide some other elements on a contact page after form submission via CSS. This does not work with ajax forms, sorry.