Last active
September 15, 2015 16:02
-
-
Save jwondrusch/a56c5618e5609d7532ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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