I noticed there is no way to include Udemy course information into a WordPress article or page. So I created a small plugin that does exactly that: it lets you embed all Udemy course information into your WordPress website.
- Install the plugin as usual by uploading it from the “plugins” menu. Activate it. If you cannot activate it, you still use PHP 5.2. You should upgrade PHP to at least 5.4.
- The text editor in text mode now has a new button called “Udemy”. You can also enter the udemy shortcode manually.
- All parameters (see below) are optional, except for the course ID. If not explicitly stated, they are set as „no“.
- id=“CourseID“: Course ID (number)
- show_teacher=“yes“ | „no“: Show name of teacher
- show_rating=“yes“ | „no“: Show rating
- show_all_ratings=“yes“ | „no“: Show text of all ratings
- show_length=“yes“ | „no“: Show length of course
- show_students=“yes“ | „no“: Show number of students
- show_promo=“yes“ | „no“: Show promo video (works only if allow_url_fopen is active)
- max_description=““: max. length of description
- ourprice=“Preis“: Show YOUR price (will be shown on the buy button)
- affiliate=“url“: Any URL you want on the buy button (affiliate, coupon link, whatever). If not set, the standard buy url will be used.
The plugin will use your theme’s CSS. It cannot be used on WordPress.com blogs! If you want to translate it to other languages than German or English, you can use the .po files in the lang folder with the PoEdit software.
udemy-shortcode Version 1.4 (8 KB, ZIP)