Shortcodes are small snippets of code that help us add reusable blocks to WordPress. They can be used on traditional content areas or on the Shortcode widget of the Front End Editor.
The list below only includes a few documented cases. Let us know if you can't find what you are looking for.
Visual Menu
Good to use on the homepage above the fold
Default Usage: [y_home_visual_menu {option_name="option_value" ...}]
Options
The options below show the defaults the shortcode uses but are editable.
donate_link="/donate/"
classes_link="/classes/"
membership_link="/memberships/"
programs_link="/programs/"
membership_description="Ready to become part of the Y family?"
programs_description="Join a sport, learn to swim, childcare and more"
classes_description="Stay active by finding a class perfect for you"
donate_description="Have a direct impact in your community"
membership_cta="JOIN NOW"
programs_cta="SEARCH PROGRAMS"
classes_cta="VIEW SCHEDULES"
donate_cta="GIVE NOW"
membership_language="MEMBERSHIP"
programs_language="PROGRAMS"
donate_language="DONATE"
group_ex_language="GROUP EXERCISE"
hide_classes="0"
hide_donate="0"
Join Strip
[join_y {join_tag="Default: Join the Y"} {url="Default: /memberships/"} {button_cta="Default: Join Today"}]JOIN TEXT[/join_y]
Branch Capacity
Lists percentage of checkins based on the branch capacity
[branch_capacity {timeout="in_minutes"} {IDs="comma_separated"} {css_class=".. col-lg-2"}]
Note: The default timeout range is 60 minutes.
Space Capacity
Adding type attribute of "space" to the Branch Capacity shortcode shows space capacities
[branch_capacity type="space" {timeout="in_minutes"} {IDs="comma_separated"} {css_class=".. col-lg-2"}]
Note: The default timeout range is 60 minutes.
Scheduling Module Availability
Allows you to display availabilty for the Scheduling credits / program module. For example, show availability for personal training or pool rentals.
[scheduling_availability category="Personal Training" {nweeks="2"} {BranchID="NN"}]
Events
Show a list of events
[core_programs program_id="events" limit="6" next_only="true" {group="session|division|program" program="ProgramID"}]
Button
A button. Any properties other than text
and link
are passed to the html anchor tag. The default class is btn btn-primary
. For a list of easily added classes check out Bootstrap Button Classes
[btn link="https://my_link_here"]MY TEXT[/btn] OR [btn link="https://my_link_here" text="MY TEXT"] OR [btn link="https://my_link_here" text="MY TEXT" class="btn btn-outline-success btn-lg"]
Big Button
Like the call to action on the member's donation tab
[big_round_button {href="optional"} {class="optional"} {img="optional"} {style="optional"}]TEXT[/big_round_button]
All Branches Map
Displays a map with all the branch locations
[all_branches_map {minify="Default FALSE"}]
Branch contact tab
Displays a banner with images and all the contact information for the branch
[branch_contact_tab]
Breadcrumbs
Displays location of current page with a display of each parent page name as a link
[breadcrumbs {separtor="Default: <i class="fal fa-angle-right"></i>"} {category-separator="Default: /"}]
Login Required
Allows creation of a webpage the requires a login to view. At least one option must be entered for the page to be accessible.
[login_required {staff="true"} {membership_categories="comma_separated_membership_type_category_IDs"} {membership_types="comma_separated_membership_type_IDs"} {redirect_language="Default: That page is not available for your membership type. Please contact your association if you believe you have received this message in error."}]
Show Branch Email Address on View All Locations page
From the Core dashboard, go to Branches > All Branches and make sure each branch you want an email to show for has an email set in the 'Contact Email' input of the 'Other Info' section.
From the Core dashboard, click on Website.
In the Worpress editor click on Templates in the sidebar.
Click on the
Add New
button at the top of the page.On the Choose Template Type box, Select Archive for the template type and give your template a name and click
Create Template
.In the Front End Editor, click the
X
to close the Library box that pops up. Then click on the Search Widget option in the top of the sidebar and type "shortcode". Drag the shortcode widget to the middle of the template.In the sidebar editor, paste in the shortcode below.
At the bottom of the sidebar, click on the green up arrow button to the right of the Publish/Update button and select Display Conditions.
In the Publish Settings box, click the
Add Condition
button and for the left select choose Include and the right select choose Branches Archive.Click
Save & Close
.Go to or refresh the View All Locations page to view the branch email addresses.
[all_branches_map include-email="true"]
Virtual Class Checkins
For virtual classes that use a custom Wordpress page, a shortcode can be added that will create program checkins for any logged in member.
[virtual_checkin class_id="ID of the class"]
Fundraising Thermometer
Show your fundraising campaign progress with a simple animated thermometer
[fundraising_thermometer campaign_id="1" subtext="left to go!"]