AJAX Dynamic Page Content

Simple ajax call to dynamically load page content, solving issues of page caching etc. Ensure jquery is activated In your function that hooks “wp_enqueue_scripts”, add this: HTML AJAX Callback

Read More

Creating cron function

Setting Up cron within wordpress Using standard recurrence values Standard recurrence values are ‘hourly’, ‘daily’ and ‘twicedaily’. Using your own recurrence values If you want something different from the standard recurrence values you can add the below to define them: Configuring WordPress to use your setup Run this once to setup with the new configuration […]

Read More

DateTime

INSERT or UPDATE row to be Now + # Days Some of the values you can use: DAYHOURMINUTEMONTHSECONDWEEKYEAR Update a DateTime with a random value

Read More

Numeric values

Increment Decrement but don’t go below a value GREATEST allows you to specify that the greater of multiple values should used. So in this example if the value drops below zero, zero will be greater used: Increment but don’t go above a value LEAST allows you to specify that the lower of multiple values should […]

Read More

Creating a cron job

The job file A cron job is simply a file the OS will call periodically for you. So just create a php file that will do what you want when you load it. This means if you use it as a browser address it will also run and do the cron tasks – handy for […]

Read More

iOS home screen icon

On iOS devices using the Safari browser when you add a web page shortcut to your home screen if will display as a screenshot of the website by default. To use an icon instead do the following: Create your icon as a 180x180px .png file (good for all iOS devices – those with regular displays […]

Read More