When your website means business.

Snippets

A collection of (mostly) WordPress-related snippets and references I’ve found useful and worth keeping where I can find them. Feel free to use what you like, and point me to some better snippets or references.

Sliding Image Background»

Cool effect if you have a good enough reason and a wide enough image.
CSS, CSS3, Images | Type: CSS

SmoothScroll to Top»

Positions element at top on scrolling using jQuery scrollTop.
Javascript, jQuery | Type: Javascript

Specify minimum size for image upload»

//specify minimum size for uploaded images (including featured images) add_filter('wp_handle_upload_prefilter','tc_handle_upload_prefilter'); function tc_handle_upload_prefilter($file) { $img=getimagesize($file['tmp_name']); $minimum = array('width' => '300', 'height' => '300'); $width= $img[0]; $height =$img[1]; if ($width < $minimum['width']…
Images, WP/CP | Type: PHP

Turn Start Date into Pretty Date»

Once you've established a date, display it as you like (see catholic fdn single-events.php for complex usage)
ACF, PHP, WP/CP | Type: PHP

Menu
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Cookies Notice