Friday, August 18, 2017

Stop Automatic Empty Trash in WordPress

Wordpress by default will automatically  empty your trash post from your site in 30 days. This is the normal Wordpress way. But what if you do not want to delete automatically...

Get Difference Between Two Times

The following function will help you get the difference from two dates in PHP. You need to specify the 2 dates when you call the function in PHP. function dateDifffun($date1, $date2){ ...

Calculate Age of somebody in PHP

If you wish a function to calculate age of a person/car or whatever you want you have come to the right place. The following function will calculate age from a specific...

WordPress 4.5.2 – update now to the latest version

Wordpress has release a security patch for their php script. It is important to update to the latest version. Why? WordPress versions 4.5.1 and earlier are affected by a SOME vulnerability through...

Countdown To A Date in PHP

If you wish a script in PHP that will countdown the time you can use the following code: $dtt_end = new DateTime('January 3, 2030 2:00 PM'); // the date to count down $remain...

Get the Week Number From A Date in PHP

When you code maybe you find difficult to get the week number from a date. Maybe you think of some particular dates and how will you get an algorithm ready for...

Fixed announce bar in HTML and CSS

Do you wish to show a fix message bar? Here is a super easy tutorial to show a fixed message bar at the bottom of the page in order to display an announcement,...

WordPress 4.5.3 – update now to the latest version

WordPress has release a new version of it's own script. Update now with the new version 4.5.3. Why should i update to version Wordpress 4.5.3? WordPress versions 4.5.2 and earlier are affected by several...

Get time formatted day-month-year in php – PHP snippet

If you wish to format a date into a different format in PHP is very simple. All you need to do is look bellow. You can use the strtotime function to...

Check If A Date Is In The Past Or In The Future in PHP

The following code will help you to check if a date in the future or in the past. Where are this required? A lot of fields date will require you to...