My Gists Here is my Gist feed showing some of my useful code snippets. You can visit my Gist feed here. 22/07/2022get acf gallery using post id outside of loop27/08/2019Get a list of field names and values from an ACF Group24/08/2019WP_Query - search CPT and two custom fields24/08/2019Allow a script to run only between two times and email on error21/08/2019Wordpress Get First X Chars From Post29/04/2019Add 21 days to the date picker on a gravity form. This is useful for only allowing people to select a date in the future.25/10/2018This is a special function whcih pulls in the remote data from the dealer core and stores a local json file with the dealers data. The dealers details pages will actually be populated from the local json file so we do not need to do any major database processed which will save database overhead.19/10/2018This checks to see if the post being loaded is 1. a special offer 2. if the dealer is authorised to load the special offer on their dealer site and if not we force a 301 redirect back to the dealers home page19/10/2018Get a list of special offers for a dealer based on whether the dealer has special offers turned off, whether they are in a certain region or whether they have their own special offers.14/10/2018WHMCS custom matching of affiliates to clients (custom hook)11/10/2017Iterate through directories and sub directories and get list of files and folders in an array03/10/2017Block one or more countries from accessing your web site27/09/2017Display a list of files within a directory27/09/2017Create a complex login password for rackspace mail api21/09/2017Block one or more countries from accessing one or more pages on your web site21/09/2017Wordpress Redirect User based on Country and Page ID20/07/2017WooCommerce conditional fields for gifts options on checkout