TJB Birthstone Feature
The TJB Birthstone Feature plugin provides a simple shortcode to display information from a custom post type birthstone, matching the current month.
by Ryan T. M. Reiffenberger · github.com/reclaimergold/tjb-birthstone-feature · website
★ 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/reclaimergold/tjb-birthstone-feature/archive/refs/heads/main.zipDescription
The TJB Birthstone Feature plugin provides a simple shortcode to display information from a custom post type birthstone, matching the current month. You can output:
- Title of the birthstone post
- Permalink (URL) to the birthstone post
- Excerpt (summary) of the birthstone post
- Featured Image (rendered as an
<img>tag)
Perfect for embedding in page builders like Elementor or directly in posts.
Installation
- Download or clone the repository into your WordPress plugins folder:
wp-content/plugins/tjb-birthstone-feature/ - Activate the plugin in the WordPress Admin under Plugins → Installed Plugins.
- Ensure you have a custom post type registered as
birthstone, with posts titled exactlyJanuary,February, etc., and set featured images as needed.
Usage
Add the [birthstone] shortcode anywhere in your content. It supports the following attributes:
| Attribute | Values | Default | Description |
|---|---|---|---|
field |
title, url, excerpt, image |
title |
What to output from the post |
size |
Any registered image size string | full |
Only applies when field="image" |
Examples
-
Title (default)
[birthstone] -
Permalink URL
[birthstone field="url"] -
Excerpt
[birthstone field="excerpt"] -
Featured Image
[birthstone field="image" size="medium"]
Customization
- Shortcode tag: To change the tag name, update the
add_shortcode()call intjb-birthstone-feature.php. - Caching: For high-traffic sites, consider wrapping the query in a transient to reduce database calls.
- Localization: All strings are wrapped in WordPress localization functions; place translation files in
/languages/.