Posts Tagged ‘Current’

Moving to Regent Software

Over the next couple weeks I’ll be cleaning up some loose ends here on thisismyurl.com and part of that includes moving several software packages from their current home here, to new website homes. Eventually, all my tools will be located at http://regentware.com.

Once everything’s moved, the new design for my website will be ready to go online as well as the new skin for http://regentware.com.

How do I add the date to my blog?

There are a lot of times when we want to add something as simple as the date to our blog but coding (especially in PHP) can be a bit difficult. Let me walk you through the steps to adding a date to your blog, assuming of course you use WordPress.

First, open your template files such as the footer by loading the footer.php file located in your /wp-content/themes/[theme name]/ folder.

Next, we need to insert a very simple PHP function called date() into your page but before we do that, we need to make sure that we open and close the PHP event. To do this, simply open it using <?php and close it using ?>. The date() function itself requires a formating argument, but luckily we’re not meant to remember them all. They can be found on the PHP date() reference page.

As an example, if you want to show the day of the week that it currently is you could open your website and edit it every day (highly impractical) or you could insert the code <?php echo date(‘l’); ?> into your page. Note that I open the PHP event, place the date() function with the argument ‘l’, indicate the end of a line (;) and then close the PHP event.  Each of these elements are required to properly format the date.

If you would like to show the current year, simply use: <?php echo date(‘Y’); ?> because Y is the symbol for the year. On the other hand, if you’d like to use something more complex, try <?php echo date(‘l jS \of F Y h:i:s A’); ?> which will return something like Monday 8th of August 2005 03:12:46 PM.

Once you’ve saved your footer.php file, simply re-upload it to your server and voila! Now you can set the date using your server and PHP instead of editing files every day! In more practical terms, it is how you can always have an updated copyright notice of your website without having to remember to update it each January.

WordPress Plugin to automatically update the copyright notice.

What is this WordPress plugin?

This plugin automatically generates a copyright notice from the first post in your blog to the current year. The Auto Copyright notice plugin fetches the first and last year of posts from the database and displays the results as a copyright notice on your website.

This process allows blog owners to add content retroactively, knowing that the  website will automatically find the first date a post is published as well as the last published date or the current year (whichever is later).

To use the plugin, simply download it and add the code  <?php echo  autocopyright();?> to your website where you’d like the copyright notice to appear.

download file WordPress Plugin to automatically update the copyright notice. image

How You Can Help

I love developing plugins for WordPress and do my best to always keep them free but of course it take a lot of time and effort to build these plugins so if you’d like to say thanks, the best way is to take a few moments and write about the plugin on your own website, include a link to my website from your posts or download and rate the plugin on the official plugin directory.

Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.