custom shortcodes

[ chattanooga_settings ]

Chattanooga Settings is a shortcode that displays the value of the current settings as defined in the admin panel. The values are displayed in a table, and the table formatting is held in custom css on the page.

Chattanooga Starting Date: Sunday, January 7th, 2024
Current Starting Skill: Setting
Current Class Pattern: Serving, Passing, Setting, Hitting

[ chatt_this_sunday ]

Chatt this Sunday is a shortcode that calculates what the class focus for the upcoming week will be, based upon the settings made in the the Chattanooga Settings Admin page.

this week: Hitting

[ ACF_option field=”____________” ]

ACF Option returns option fields in the database. Note: this is different from general field values. These are fields set to be options in the admin side of the website.

Copy to Clipboard

Returns:

Option Name: chattanooga_starting_date
Option Value: 01/01/2023

[ skill_date skill=”_____” return=”______” ]

Skill Date calculates the next date of a skill, and returns the name of the skill, the date of the skill, or both. It takes an argument for Skill (typically Serving, Passing, Setting, or Hitting) and a an argument for what you want to return (skill, date, or both).

Example 1: Return both the skill name and upcoming date

Copy to Clipboard

Returns: Hitting: Dec 10, 2023

 
Example 2: Return just the upcoming date

Copy to Clipboard

Returns: Jul 21, 2024


Example 3: Return just the skill name

Copy to Clipboard

Returns: Passing

Adding color to highlight values

By combining shortcodes with different return values, you can create dynamic values with color changes.

Copy to Clipboard

Returns:

Hitting: This Sunday - Jun 30, 2024