FitPro Custom Shortcodes

WordPress Shortcodes allow you to easily add pre-designed elements to your website via posts, pages, or text widgets!

Year Shortcode

Uses the PHP date() function to return the current year. Does not accept any parameters.

Example usage

[year]

 

Site URL Shortcode

Outputs a link to the site homepage. Does not accept any parameters.

Example usage

[site-url]

 

Testimonial Shortcode

Displays a single testimonial created via Testimonials > Add New Testimonial.

Grab the shortcode by opening up an existing testimonial and copying it from the ‘Testimonial Shortcode’ meta box. Then just paste this in to any post, page, or text widget, and you’re good to go!

Example usage

[tml id='208']

Parameters

'id' (numerical string) (required)

  • Description: Unique ID for the testimonial
  • Default: (none)

 

Box Shortcode

Display content inside a colored box container. Great for highlighting a section of a page.

Example usage

[box color="blue"]Box text and media goes here. Shortcodes inside box ok too![/box]

Parameters

'color' (string) (optional)

  • Description: Box container color. Acceptable colors are ‘green’, ‘blue’, ‘yellow’, or ‘red’. Default color used if none specified.
  • Default: ‘default’

 

Button Shortcode

Displays a colored button.

Example usage

[button color="green" link="http://fitprosites.com" size="big" target="_blank"]Button Text Here[/button]

Parameters

'color' (string) (optional)

  • Description: Button color. Acceptable colors are ‘gold’, ‘lightblue’, ‘gray’, ‘black’, ‘white’, ‘red’, ‘blue’, ‘yellow’. Default color used if none specified.
  • Default: ‘defaultbtn’

'link' (string) (optional)

  • Description: URL to link button to.
  • Default: ‘#’

'size' (string) (optional)

  • Description: Size of button. Can be ‘big’, or left blank.
  • Default: (none)

'target' (string) (optional)

  • Description: Link target, same as in normal HTML (e.g. ‘_blank’).
  • Default: (none)

 

Loginout Shortcode

Displays a login or logout link depending on if a user is currently logged in or not.

Example usage

[loginout class="myclass" redirect="http://fitprosites.com/support" login_text="Please Login" logout_text="Please Logout"]

Parameters

'class' (string) (optional)

  • Description: Add one or CSS classes (in a list separated by spaces) that will be added to the login/logout link.
  • Default: (none)

'show_login' (boolean string) (optional)

  • Description: If set to true the login link will be shown (for non-logged in users), otherwise it will be hidden.
  • Default: ‘true’

'show_logout' (boolean string) (optional)

  • Description: If set to true the logout link will be shown (for logged in users), otherwise it will be hidden.
  • Default: ‘true’

'redirect' (string) (required)

  • Description: The URL to redirect to after login/logout.
  • Default: (none)

'login_text' (string) (optional)

  • Description: Customize login text.
  • Default: ‘Log In’

'logout_text' (string) (optional)

  • Description: Customize logout text.
  • Default: ‘Log Out’

 

The rest of the shortcodes on this page are a little different in that they should be used together with one or more shortcodes for the best results.

 

Two Column Shortcodes

Column shortcodes that allow you to create a two column page.

Example #1

[one_half]1st Column[/one_half][one_half_last]2nd Column[/one_half_last]

Example #2

[one_third]1st Column[/one_third][two_thirds_last]2nd Column[/two_thirds_last]

Example #3

[two_thirds]1st Column[/two_thirds][one_third_last]2nd Column[/one_third_last]

Example #4

[one_fourth]1st Column[/one_fourth][three_fourths_last]2nd Column[/three_fourths_last]

Example #5

[three_fourths]1st Column[/three_fourths][one_fourth_last]2nd Column[/one_fourth_last]

 

Three Column Shortcodes

Column shortcodes that allow you to create a three column page.

Example usage

[one_third]1st Column[/one_third][one_third]2nd Column[/one_third][one_third_last]3rd Column[/one_third_last]

Four Column Shortcodes

Column shortcodes that allow you to create a four column page.

Example usage

[one_fourth]1st Column[/one_fourth][one_fourth]2nd Column[/one_fourth][one_fourth]3rd Column[/one_fourth][one_fourth_last]4th Column[/one_fourth_last]