// connect to the website endpoint with wp_remote_get() function
// pass params as URL query args, full parameter list is here https://developer.wordpress.org/rest-api/reference/posts/
// at this moment you can use any parameter with Context: View
// it would be strange if you can fetch drafts or private posts, right?
$response = wp_remote_get( add_query_arg( array(
'per_page' => 2
), 'https://ma.tt/wp-json/wp/v2/posts' ) );
if( !is_wp_error( $response ) && $response['response']['code'] == 200 ) {
$remote_posts = json_decode( $response['body'] ); // our posts are here
foreach( $remote_posts as $remote_post ) {
// display post titles and excerpts
echo '<h2>'. $remote_post->title->rendered . '</h2><p>' . $remote_post->excerpt->rendered . '</p>';
// need more parameters? print_r( $remote_post )
}
}
{"serviceMessages":{"errors":[],"warnings":[],"infoMessages":[],"allMessages":[]},"departmentId":null,"clientId":35154,"clientName":"The Falany at Reinhardt University","clientActive":true,"errors":[],"warnings":[],"performancesByDateDisplay":{"2019-09-27":[{"performanceId":10400990,"performanceStart":1569627000000,"performanceDate":"09/27/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Fri, Sep 27, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"Presented by the University Theatre","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1008978,"productionName":"The Crucible","hasAvailableTickets":true,"tixRemaining":128,"customMessage":"Tickets will be on sale to the public on August 1st. Patron Membership holders may purchase tickets immediately.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":true,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"The University Theatre presents The Crucible. This performance will be held in the University Theater. Seating at the University Theater is not reserved. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-10-05":[{"performanceId":10400993,"performanceStart":1570318200000,"performanceDate":"10/05/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Sat, Oct 5, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"Presented by the University Theatre","performanceNotes":"","availabilityCode":"A","displayCode":"M","productionId":1008978,"productionName":"The Crucible","hasAvailableTickets":true,"tixRemaining":144,"customMessage":"Tickets will be on sale to the public on August 1st. Patron Membership holders may purchase tickets immediately.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":true,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"The University Theatre presents The Crucible. This performance will be held in the University Theater. Seating at the University Theater is not reserved. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]},{"performanceId":10401887,"performanceStart":1570302000000,"performanceDate":"10/05/2019","performanceTime":"3:00 PM","performanceTime24":"15:00:00","performanceStartDate":"Sat, Oct 5, 2019 - 3:00 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009076,"productionName":"Beginnings: A Chicago Tribute","hasAvailableTickets":true,"tixRemaining":198,"customMessage":"Tickets will go on sale to the public on August 6th. On sale immediately for Patron Membership holders.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"https://web.ovationtix.com/trs/clientFile/340743","productionDescription":"\r\n\t\t\t\t\t\t\t\t\t\tBeginnings is a celebration of the music of Chicago, performed by world-class musicians and vocalists who recreate the sound, excitement and emotion of three decades of hits from Chicago’s hey-day.<br>Member Credits include performances with platinum recording & Hall-of-Fame Rock & Soul artists including: Peter Frampton, Don Henley, Aretha Franklin, The Temptations, Warren Haynes, Blood Sweat & Tears, Spyro Gyra, KC & the Sunshine Band, Will Lee (The Tonight Show Band) and the Broadway hit musical Rock of Ages! <br><br>The music of 2016 Rock ’n’ Roll Hall of Fame inductees Chicago spans more than four decades and includes five #1 albums and 20 top-ten hits. These timeless classics are guaranteed to be enjoyed by music fans of all ages when performed by this talented group of musicians.<br><br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]},{"performanceId":10401886,"performanceStart":1570318200000,"performanceDate":"10/05/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Sat, Oct 5, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009076,"productionName":"Beginnings: A Chicago Tribute","hasAvailableTickets":true,"tixRemaining":123,"customMessage":"Tickets will go on sale to the public on August 5th. On sale immediately for Patron Membership holders.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"https://web.ovationtix.com/trs/clientFile/340743","productionDescription":"\r\n\t\t\t\t\t\t\t\t\t\tBeginnings is a celebration of the music of Chicago, performed by world-class musicians and vocalists who recreate the sound, excitement and emotion of three decades of hits from Chicago’s hey-day.<br>Member Credits include performances with platinum recording & Hall-of-Fame Rock & Soul artists including: Peter Frampton, Don Henley, Aretha Franklin, The Temptations, Warren Haynes, Blood Sweat & Tears, Spyro Gyra, KC & the Sunshine Band, Will Lee (The Tonight Show Band) and the Broadway hit musical Rock of Ages! <br><br>The music of 2016 Rock ’n’ Roll Hall of Fame inductees Chicago spans more than four decades and includes five #1 albums and 20 top-ten hits. These timeless classics are guaranteed to be enjoyed by music fans of all ages when performed by this talented group of musicians.<br><br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-09-28":[{"performanceId":10400991,"performanceStart":1569713400000,"performanceDate":"09/28/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Sat, Sep 28, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"Presented by the University Theatre","performanceNotes":"","availabilityCode":"A","displayCode":"M","productionId":1008978,"productionName":"The Crucible","hasAvailableTickets":true,"tixRemaining":142,"customMessage":"Tickets will be on sale to the public on August 1st. Patron Membership holders may purchase tickets immediately.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":true,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"The University Theatre presents The Crucible. This performance will be held in the University Theater. Seating at the University Theater is not reserved. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-09-29":[{"performanceId":10400994,"performanceStart":1569783600000,"performanceDate":"09/29/2019","performanceTime":"3:00 PM","performanceTime24":"15:00:00","performanceStartDate":"Sun, Sep 29, 2019 - 3:00 PM","performanceSuperTitle":"","performanceSubTitle":"Presented by the University Theatre","performanceNotes":"","availabilityCode":"A","displayCode":"M","productionId":1008978,"productionName":"The Crucible","hasAvailableTickets":true,"tixRemaining":138,"customMessage":"Tickets will be on sale to the public on August 1st. Patron Membership holders may purchase tickets immediately.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":true,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"The University Theatre presents The Crucible. This performance will be held in the University Theater. Seating at the University Theater is not reserved. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-09-07":[{"performanceId":10401864,"performanceStart":1567882800000,"performanceDate":"09/07/2019","performanceTime":"3:00 PM","performanceTime24":"15:00:00","performanceStartDate":"Sat, Sep 7, 2019 - 3:00 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009069,"productionName":"The Coasters","hasAvailableTickets":true,"tixRemaining":162,"customMessage":"Tickets will go on sale to the public on August 1st. On sale immediately for Patron Membership holders.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"https://web.ovationtix.com/trs/clientFile/340741","productionDescription":"\r\n\t\t\t\t\t\t\t\t\t\tThe Coasters are an American Rhythm & Blues and rock ‘n’ roll vocal group that had a string of hits in the late 1950s. Beginning with “Searchin” and “Young Blood”, their most memorable songs were written by the songwriting and producing team Leiber and Stoller. Although the Coasters originated outside of mainstream doowop, their records were so frequently imitated that they became an important part of the doo wop legacy through the 1960s. The Coasters' hits also comprised a major portion of the song score for the 1994 musical revue Smokey Joe’s Café, a retrospective of Leiber & Stoller songs that received one Grammy Award and seven Tony Award nominations following its 1995 Broadway debut. From “Yakkety Yak” to “Charlie Brown” to “Poison Ivy”, these monumental songs helped induct The Coasters into the Rock and Roll Hall of Fame in 1987.","departmentId":null,"departmentName":null,"performanceEntryTimes":[]},{"performanceId":10401850,"performanceStart":1567899000000,"performanceDate":"09/07/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Sat, Sep 7, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009069,"productionName":"The Coasters","hasAvailableTickets":true,"tixRemaining":69,"customMessage":"Tickets will go on sale to the public on August 1st. On sale immediately for Patron Membership holders.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"https://web.ovationtix.com/trs/clientFile/340741","productionDescription":"\r\n\t\t\t\t\t\t\t\t\t\tThe Coasters are an American Rhythm & Blues and rock ‘n’ roll vocal group that had a string of hits in the late 1950s. Beginning with “Searchin” and “Young Blood”, their most memorable songs were written by the songwriting and producing team Leiber and Stoller. Although the Coasters originated outside of mainstream doowop, their records were so frequently imitated that they became an important part of the doo wop legacy through the 1960s. The Coasters' hits also comprised a major portion of the song score for the 1994 musical revue Smokey Joe’s Café, a retrospective of Leiber & Stoller songs that received one Grammy Award and seven Tony Award nominations following its 1995 Broadway debut. From “Yakkety Yak” to “Charlie Brown” to “Poison Ivy”, these monumental songs helped induct The Coasters into the Rock and Roll Hall of Fame in 1987.","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-10-04":[{"performanceId":10400992,"performanceStart":1570231800000,"performanceDate":"10/04/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Fri, Oct 4, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"Presented by the University Theatre","performanceNotes":"","availabilityCode":"A","displayCode":"M","productionId":1008978,"productionName":"The Crucible","hasAvailableTickets":true,"tixRemaining":142,"customMessage":"Tickets will be on sale to the public on August 1st. Patron Membership holders may purchase tickets immediately.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":true,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"The University Theatre presents The Crucible. This performance will be held in the University Theater. Seating at the University Theater is not reserved. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-09-20":[{"performanceId":10401885,"performanceStart":1569022200000,"performanceDate":"09/20/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Fri, Sep 20, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009075,"productionName":"Joe Gransden and His Big Band","hasAvailableTickets":true,"tixRemaining":250,"customMessage":"Tickets will go on sale to the public on August 1st. On sale immediately for Patron Membership holders.","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"https://web.ovationtix.com/trs/clientFile/340742","productionDescription":"\r\n\t\t\t\t\t\t\t\t\t\tAt 42 Years old, Joe Gransden has already performed worldwide and released 14 CDs under his own name. Renowned first for the hard bop approach of his trumpet, Joe Gransden’s singing voice has been compared to that of Chet Baker and Frank Sinatra. The Joe Gransden 16 Piece Big Band is quickly becoming one of the busiest groups on the jazz scene. Originally formed in 2009, Joe and the guys have continued to build momentum and are performing numerous shows around the country. A rising star in the jazz world, Joe and his Big Band are not one to miss. <br>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}],"2019-09-24":[{"performanceId":10401735,"performanceStart":1569367800000,"performanceDate":"09/24/2019","performanceTime":"7:30 PM","performanceTime24":"19:30:00","performanceStartDate":"Tue, Sep 24, 2019 - 7:30 PM","performanceSuperTitle":"","performanceSubTitle":"","performanceNotes":"","availabilityCode":"P","displayCode":"M","productionId":1009055,"productionName":"The University Wind Ensemble","hasAvailableTickets":true,"tixRemaining":293,"customMessage":"Tickets will go on sale to the public on August 1st. On sale immediately for Patron Membership holders. ","noRemainingTicketsMessage":null,"shutoffHour":2.00,"shutoffHourMessage":null,"generalAdmission":false,"allDayEvent":false,"doorEntryStartDate":null,"doorEntryStartTime":null,"doorEntryEndDate":null,"doorEntryEndTime":null,"productionLogoLink":"","productionDescription":"<div>\r\n\t\t\t\t\t\t\t\t\t\tThe Reinhardt University Wind Ensemble is comprised of advanced and versatile musicians who perform the finest large ensemble and chamber music literature, including world premiere performances from today's most innovative and exceptional composers. <br></div>","departmentId":null,"departmentName":null,"performanceEntryTimes":[]}]}}