This is my repository of code snippets, url links, and other stuff that I use to develop website with. The main purpose of this site is to catalog, and easy search for the stuff that I use on a regular basis.
CDN resources are useful for including common scripts, but the jquery ui script also requires the stylesheets. The following code will add the jqueryui stylesheets for the proper version that is included with wordpress. reference: https://stackoverflow.com/questions/8849684/wordpress-jquery-ui-css-files
Stop using @import in child themes. Use the following code in your functions.php file to enqueue the parent theme style.css file, and avoid using @import. reference: https://konstantin.blog/2014/child-themes-import/
Get ride of over branding and the related videos at the end of the video for wordpress oEmbed videos.
I came across this little snippet for querying records where a date field matches today’s date. Using the date function to make sure that only the date portion is returned without the time makes it a quick query that does not require using an external programming language to try and format today’s date correctly for […]
In case you need to dynamically populate the e-mail notifications for your forms, you can make modifications with the gform_notification filter. The example below allows you to modify a specific form (form id 7), or you can leave off the “_7” at the end to target all forms for the site. I’ve used this to […]
The following code will allow you to vertically center content in a box, without having to use the css display properties of table and table-cell. reference: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/
A simple function that will allow you to get the URL parameters in javascript. http://www.jquerybyexample.net/2012/06/get-url-parameters-using-jquery.html
This function will return the shopp objects that are tagged as featured in an array. Once the objects are returned you can use the shopp() function, when looping through the array, to return the tag for the product (see https://shopplugin.net/api/shopp/). This will be faster than looping through all the products looking for ones that are […]
The ACF Pro plugin apparently does not work any longer with the shopp plugin product categories. I found this code to add that support to ACF Pro. https://gist.github.com/WazzaJB/f7c75e05a325c86dd421
Create yourself a wordpress admin user account if you only have ftp access to a site. Add this snippet to the theme’s functions.php file, or in a file in ~/wp-content/mu-plugins/ folder. Create New Admin Account in WordPress via FTP