WordPress Code Generated – GenerateWP

WordPress Code Generated – GenerateWP I came across this very useful site that can be used to get you started with your WordPress plugin or other customizations, generatewp.com. They have 28 generators for free as well as 5 premium ones that you have to have a...

WordPress Plugin Starter Comments

Here is the minimum comment that you need for a plugin to be recognized. <?php /* Plugin Name: Example Plugin */   Here is the a sample of a plugin with more of the information that is recommended along with some of the default activation calls. <?php //...

WordPress StrToTime Function

There is times that I am wanting to convert a time string and have it output in the sites timezone. This is a simple function that utilizes the DateTime class and implements the wp_timezone for its output. function wp_strtotime($str) { $datetime = new DateTime($str,...

WP pre_get_posts Usage

Using pre_get_posts can be very useful for optimizing a query on a looped page.  It allows you to add limitations or custom post types to the main WP query allowing you to do what you have been doing in two steps into one single step.  Here is one example of how to...

WP-Optimize – Purge cache and minify automatically

Sometimes there are files that can fill up your hosting account that are not needed. I did some looking for a way to have this auto clean these files. Not sure if this does it but I am hoping it does. add_filter( ‘wp_optimize_minify_cache_expiry_time', function(...