Adding Validation to a WordPress Creation Toolkit Field

So I ran into a need to validate an email address for a frontend posting of a custom post type using Cozmos Labs WordPress Creation Toolkit.  Here is the code that I used to be able to accomplish that.  There is some commented out code that allows for you to see what...

Create CSV File using PHP

Came across this nice little bit of code to write a CSV file on the fly using PHP and grabbing the data from a MySQL database.  Thank you Stephen Morley for authoring a great little how to. Create Downloadable CSV File using PHP // output headers so that the file is...

Custom Gravity Forms Popup Error Message

Here is a sample of code on how to show a custom popup error message. functions.php add_filter( 'gform_validation_message_3', 'sw_gf_validation_message', 10, 2 ); function sw_gf_validation_message( $validation_message ) { add_filter( 'wp_footer', 'sw_gf_js_error' ); }...

Customize the Added to Cart Message

So I ran into a request where the client was looking to have a Continue Shopping button after a product got added to the cart.  So in this example I used the wc_add_to_cart_message hook to add a continue shopping button below what normally got output.  You will also...

Deactivate post after certain date

Here is a little function that upon loading of site checks to see if the date is past the set date for that post id.  If so then it sets that post to draft mode and removes the post from the live site. Set Posts to Draft if after Date function deactivate_post_check()...