WP Manifestindependent plugin directory
manifest / unclassified / wp-plugin-my-age

My Age

A simple WordPress plugin that uses the [my_age] shortcode to display an automatically updated age, with an optional birthday message.

by Gareth J M Saunders · github.com/garethjmsaunders/wp-plugin-my-age

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/garethjmsaunders/wp-plugin-my-age/archive/refs/heads/main.zip

A simple WordPress plugin that displays an automatically updated age using the [my_age] shortcode.

Features

  • Calculates your current age from a saved date of birth
  • Outputs the age as a number only, such as 54
  • Provides a native date picker on the settings page
  • Supports an optional, editable birthday message
  • Uses the timezone configured in WordPress

On your birthday, the optional message can display:

54 (Happy birthday to me!)

Requirements

  • WordPress 6.0 or later
  • PHP 7.4 or later

Tested up to WordPress 6.8.

Installation

  1. Download the plugin ZIP file.
  2. In WordPress, go to Plugins → Add Plugin → Upload Plugin.
  3. Select my-age.zip and choose Install Now.
  4. Activate My Age.
  5. Go to Settings → My Age.
  6. Enter your date of birth and save the settings.

Usage

Add the following shortcode to a page, post, sidebar or any other area that processes WordPress shortcodes:

[my_age]

The shortcode outputs the number only. For example:

I am [my_age] years old.

will display as:

I am 54 years old.

The age changes on your birthday according to the timezone selected under Settings → General in WordPress.

Frequently asked questions

What happens if I have not entered a date of birth?

The shortcode outputs nothing.

Does the shortcode include the words "years old"?

No. It outputs the number only, allowing you to use it naturally within your own text.

Can it display a birthday message?

Yes. You can enable the birthday message and edit its wording under Settings → My Age. The message appears in parentheses after your age on your birthday.

Changelog

1.0.0

  • Initial release.

Licence

My Age is licensed under the GNU General Public License v3.0.

Author

Gareth J M Saunders