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.

Enqueue stylesheet for jQuery UI from ajax.googleapis.com

July 12, 2017

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

Replace @import in WordPress Child Themes

June 23, 2017

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/

WordPress YouTube oEmbed Filters

September 28, 2016

Get ride of over branding and the related videos at the end of the video for wordpress oEmbed videos.

SELECT records with Today’s Date

May 25, 2016

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 […]

Alter Gravity Form Notification E-mails

January 19, 2016

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 […]

Vertical Align Content Without Using Display Table

December 3, 2015

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/

Get URL Parameters in Javascript

October 30, 2015

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

Get the Shopp Featured Products

February 15, 2015

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 […]

Adding ACF Pro support to Shopp Categories

February 15, 2015

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

Add WordPress Admin Account via FTP

February 14, 2015

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

Scroll to Top