{"id":75927,"date":"2014-04-16T11:23:54","date_gmt":"2014-04-16T15:23:54","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=75927"},"modified":"2025-02-09T10:36:48","modified_gmt":"2025-02-09T15:36:48","slug":"embed-course-feeds","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/wordpress\/how-to\/embed-course-feeds\/","title":{"rendered":"Embed Feeds from the Course Catalog"},"content":{"rendered":"<p>Editors can add live information from BU\u2019s course catalog directly to their page using the Course Feed plugin. This plugin must be activated for your site before it can be used. Please <a href=\"http:\/\/www.bu.edu\/help\/wordpress\/\">contact us<\/a> if you&#8217;re interested in activating the Course Feeds plugin.<\/p>\n<h2>Quick start<\/h2>\n<p><code>[bu-course-feed include=\"CASPY\"] <\/code>will list all courses in the College of Arts and Sciences&#8217; Physics department using the three-letter college code plus the two-letter department identifier.<\/p>\n<div id=\"attachment76334\" style=\"width: 521px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment76334\" loading=\"lazy\" src=\"\/tech\/files\/2014\/04\/fig-1.png\" alt=\"fig-1\" width=\"511\" height=\"319\" \/><p id=\"caption-attachment76334\" class=\"wp-caption-text\">Embedded course feed of CAS Physics courses.<\/p><\/div>\n<h2>Choosing which courses to display<\/h2>\n<h3><code>Include<\/code> what you want<\/h3>\n<p>Specify which courses to display using the <code>include<\/code> attribute. \u00a0This can be done in four ways:<\/p>\n<ol>\n<li>Include all courses from an entire college by specifying the college&#8217;s three letter code. \u00a0For example, <code>[bu-course-feed include=\"CAS\"]<\/code> would include all courses in the College of Arts and Sciences.<\/li>\n<li>Include only courses from a specific department by specifying the college&#8217;s three letter code followed by the department&#8217;s two letter code. \u00a0For example, <code>[bu-course-feed include=\"CASPY\"]<\/code> would include all courses in the College of Arts and Sciences&#8217; Physics department.<\/li>\n<li>Include only a specific course by specifying the exact course ID. \u00a0For example, <code>[bu-course-feed include=\"CASPY103\"]<\/code>.<\/li>\n<li>Include a range of courses within a department. \u00a0For example, <code>[bu-course-feed include=\"CASPY100-CASPY199\"]<\/code> would list all 100-level courses in the College of Arts and Sciences&#8217; physics department.<\/li>\n<\/ol>\n<p>Additionally, you can specify multiple inclusions by separating them with commas. \u00a0For example, to list two specific courses one could use <code>[bu-course-feed include=\"CASPY105,CASPY103\"]<\/code>. \u00a0Note that when using multiple inclusions, the order in which they appear in the short code is ignored.<\/p>\n<h3><code>Exclude<\/code> what you don&#8217;t want<\/h3>\n<p>You can filter out any items you don&#8217;t want with the <code>exclude\u00a0<\/code>attribute. This follows the same format as <code>include<\/code>, and any courses in the exclusion list will be omitted from the generated list. For example, <code>[bu-course-feed include=\"CASPY\" exclude=\"CASPY105]<\/code> lists all Physics courses except for PY 105.<\/p>\n<h3>Hub Areas<\/h3>\n<p>Courses can be limited by <a href=\"http:\/\/www.bu.edu\/hub\/about-the-hub\/what-is-the-hub\/\">Hub areas<\/a> by using the <code>hub=\"\"<\/code> attribute.<\/p>\n<p><code>[bu-course-feed include=\"CGS\" hub=\"D\"]<\/code> will display courses with Hub Area D (Scientific Inquiry I) for the College of General Studies. Multiple areas may be listed with <code>hub=\"D,E,F\"<\/code> or to include courses with <strong><em>any<\/em><\/strong> hub areas, <code>hub=\"any\"<\/code> will also work.<\/p>\n<p>By default, all areas added in the <code>hub=\"\"<\/code> attribute must be on a course for it to be displayed. For example,\u00a0\u00a0<code>[bu-course-feed include=\"CGS\" hub=\"D, H\"]<\/code> will display courses that have\u00a0area Area D (Scientific Inquiry I)\u00a0<strong>AND<\/strong> Area H (Quantitative Reasoning II, for the College of General Studies).<\/p>\n<p>Using the attribute <code>hub_match=\"any\"<\/code> will display courses that match any of the areas in the <code>hub=\"\"<\/code> attribute. For example,<code>[bu-course-feed include=\"CGS\" hub=\"D, H\" hub_match=\"any\"]<\/code> will display all courses that have area Area D (Scientific Inquiry I)\u00a0<strong>OR<\/strong> Area H (Quantitative Reasoning II) for the College of General Studies.<\/p>\n<h2>Getting schedule info<\/h2>\n<p>The examples above will only produce summary information like course ID and description. To see more specific details like scheduling and instructor info, you must specify which period you want this info for. Periods are specified with the <code>period<\/code> attribute and this may be a list of multiple periods separated by commas. A period is a 4-digit year followed by a four-character semester code. Semester codes are one of <code>FALL<\/code>, <code>SPRG<\/code>, <code>SUM1<\/code>, or <code>SUM2 <\/code>for the fall, spring, and two summer semesters respectively.<\/p>\n<p>The following shortcode will produce a feed of all courses in <code>CASPY<\/code> except for <code>CASPY105<\/code>, and for courses which were available in Fall of 2013 it will also show their specific schedule details.<\/p>\n<p><code>[bu-course-feed include=\"CASPY\" exclude=\"CASPY105\" period=\"2013FALL\"]<\/code><\/p>\n<div id=\"attachment76339\" style=\"width: 521px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment76339\" loading=\"lazy\" src=\"\/tech\/files\/2014\/04\/fig-2.png\" alt=\"fig-2\" class=\"wp-image-76339 \" width=\"511\" height=\"319\" \/><p id=\"caption-attachment76339\" class=\"wp-caption-text\">Course details included for a semester&#8217;s courses.<\/p><\/div>\n<p>However, this list includes many courses that were not offered during this period; they simply lack schedule info. If you only want to display courses that were offered during this period you may specify <code>only_offered=\"Y\"<\/code>, which will omit any courses that are in the <code>include<\/code> list but were not offered during the period(s) mentioned in <code>period<\/code>.<\/p>\n<h2>Using the bulletin<\/h2>\n<p>A course&#8217;s details can vary over time, so the period specified is used to determine which version of a course&#8217;s details to show. If no period is specified, the most current information will be used instead.<\/p>\n<p>An alternative is to specify <code>use_bulletin=\"Y\"<\/code> in the shortcode. This will ensure that the feed uses the information that is current in the <a href=\"http:\/\/www.bu.edu\/academics\/bulletin\/\" title=\"Academics' bulletin\">bulletin<\/a> regardless of what period is being shown.<\/p>\n<h2>Fine tuning output<\/h2>\n<p>There are some additional shortcode attributes that can further refine the output:<\/p>\n<ul>\n<li><code>blank_titles<\/code> &#8212; set to &#8220;N&#8221; to hide courses that have no title. \u00a0By default they are shown.<\/li>\n<li><code>page_size <\/code>&#8212; set to the maximum number of courses to display on a page. \u00a0By default all courses appear on a single page, which can be unwieldy for larger lists.<\/li>\n<li><code>paging <\/code>&#8212; set this to &#8220;before&#8221;, &#8220;after&#8221;, &#8220;both&#8221;, or &#8220;none&#8221; when using <code>page_size<\/code>. \u00a0This determines where page links are displayed with respect to the list. \u00a0By default they appear after the list.<\/li>\n<li><code>paging_sep <\/code>&#8212; set this to whatever you&#8217;d like to use to separate individual page numbers. \u00a0By default this is the \u00b7 character.<\/li>\n<\/ul>\n<h2>Custom formats<\/h2>\n<p>The plugin offers a few options for customizing markup. \u00a0Your theme will provide a default structure; this is what would be used in all of the examples above. \u00a0Some themes may additionally offer named formats that change the output produced by the shortcode. \u00a0Consult the documentation provided with your theme to determine if your theme supports named formats for course feeds. \u00a0If it does, you can specify a custom format for your feed like:<\/p>\n<p><code>[bu-course-feed include=\"CASPY\" format=\"condensed\"]<\/code><\/p>\n<p>This would show all courses in CASPY using the &#8220;condensed&#8221; format. \u00a0For this to be effective your theme must specifically define a format called &#8220;condensed&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Editors can add live information from BU\u2019s course catalog directly to their page using the Course Feed plugin. This plugin must be activated for your site before it can be used. Please contact us if you&#8217;re interested in activating the Course Feeds plugin. Quick start [bu-course-feed include=&#8221;CASPY&#8221;] will list all courses in the College of&#8230;<\/p>\n","protected":false},"author":1303,"featured_media":0,"parent":304,"menu_order":20,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/75927"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1303"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=75927"}],"version-history":[{"count":7,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/75927\/revisions"}],"predecessor-version":[{"id":155813,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/75927\/revisions\/155813"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/304"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=75927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}