How can we help you?

Posting WODs to your Website

Follow

Wodify_Bar_All.png

RequiredAddOn_Perform.png

Wodify's WOD integration is designed for Posting WODs to your WordPress Blog. However, Wodify does open its web services API for sites that enable PHP, such as ExpressionEngine.

  • Please note we currently do not integrate with Wix. 

 

In this article, we will cover:

 

Finding your Gym's API Key

  1. Go to Gym > Web Integrations
  2. Go to API Keys and click Edit
  3. Click +API Key
  4. Add an API Key Name and click ✔️Web_Integrations.png

 

Integrating with Squarespace and Box Ally 

To integrate with a Squarespace or Box Ally site, please use the following lines of example code to each page you wish to have WODs displayed on. 

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
    function loadFormattedWOD(selector, apiKey, date, location, program) { 
        $.ajax({
            url: 'https://app.wodify.com/API/WODs_v1.aspx', 
            data: {
                apiKey: apiKey,
                date: date,
                location: location,
                program: program,
                type: "json"
            }, 
            dataType: "json", 
            success: function(data){ 
                if(data && data.RecordList.APIWod.FormattedWOD) { 
                  $(selector).html(data.RecordList.APIWod.FormattedWOD); 
                } 
            } 
        }); 
    }
    var today = new Date();
    var dateString = today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate();
    loadFormattedWOD("#wodbody", "APIKEY GOES HERE", dateString, "YOUR LOCATION GOES HERE", "YOUR PROGRAM GOES HERE"); 

</script>
<div id="wodbody" />

You will need to update the following:

  • "apiKey": Enter the API key for the tenant here
  • "location": Enter the name of the location you wish to pull WODs from
  • "program": Enter the name of the program you wish to pull WODs from

 

Integrating with Expression Engine

Wodify also integrates with Expression Engine. Expression Engine is a general-purpose content management system written in object-oriented PHP and using MySQL for data storage. Similar to WordPress, EE allows website administrators a means of managing their website without need the to understand or use code, though it also offers features useful for practiced developers and designers.

 

Here is a PHP example to help you publish your WODs using ExpressionEngine. 

<?php    
  if(!class_exists('GetWOD')) {        
    class GetWOD {            
      public $APIKey;            
      public $Date;            
      public $LocationText;            
      public $ProgramText;
             
      function __construct($apikey, $date, $locationtext, $programtext){         $this->APIKey = $apikey;                
        $this->Date = $date;                
        $this->LocationText = $locationtext;                
        $this->ProgramText = $programtext;            
      }        
    }    
  }
     
  $SOAPClient = new SoapClient("https://app.wodify.com/API/WOD_v1.asmx?wsdl", array('features' => SOAP_SINGLE_ELEMENT_ARRAYS));    
 
  // Call RemoteFunction ()     
  $error = 0;    
  $soapResponse = "";    
  try {        
    // CHANGE THE 'API KEY', 'LOCATION NAME', AND 'PROGRAM NAME' BELOW TO THE CORRECT VALUES!        
    $soapResponse = $SOAPClient->GetWOD(new GetWOD('API KEY', '{entry_date format="%Y-%m-%d"}', 'LOCATION NAME', 'PROGRAM NAME'));    
  } catch (SoapFault $fault) {        
    $error = 1;        
    print("Sorry, GetWOD returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring);    
  }      
  if ($error == 0) {        
    if (is_null($soapResponse)) {            
      print("NULL response");        
    } else {            
      print($soapResponse->WOD->FormattedWOD);            
      print("<p><a href=\"https://app.wodify.com/PerformanceTracking/PublicWhiteboard.aspx?WhiteboardKey=mg4w0xd3xl&Date={entry_date format="%Y-%m-%d"}&ProgramName=CrossFit&LocationName=CFA\" target=\"_blank\"><img src=\"THE URL TO YOUR WOD RESULTS GOES BUTTON HERE" /></a></p>");        
    }    
  }
?>

 

Other Integrations Offered by Wodify 

Wodify offers WOD Integration through our API by the following methods:

  1. Rest API 
  2. SOAP
  3. Program API 

 

____________________

More Information:

TIP: Wodify Blueprint Course - Getting Started with Wodify Perform

If you need any additional assistance with Posting WODs to your Website, feel free to reach out to us at support@wodify.com.

Comments

Check the current status of our products

View status