Skip to content

Instantly share code, notes, and snippets.

@jwondrusch
Last active September 15, 2015 16:02
Show Gist options
  • Save jwondrusch/a56c5618e5609d7532ad to your computer and use it in GitHub Desktop.
Save jwondrusch/a56c5618e5609d7532ad to your computer and use it in GitHub Desktop.
<?php
/*
A quick snippet for getting basic data about courses.
See: zippy-courses/app/Shortcodes/Views/CourseDirectory.php for more info on how the current Course Directory is set up.
See: zippy-courses/lib/Models/Course/Course.php for available methods on course object
*/
$zippy = Zippy::instance();
$course_ids = $zippy->utilities->course->getAllCourseIds();
foreach ($course_ids as $course_id) {
$course = $zippy->make('course', array($course_id));
$title = get_the_title($course_id);
$excerpt = $course->getExcerpt();
$public_excerp = $course->getPublicExcerpt();
// Do your output here
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment