| 开发者 | sdavis2702 |
|---|---|
| 更新时间 | 2026年4月7日 00:33 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.7 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
scc_templates in the root of your active theme and copy any files from the plugin's includes/scc_templates/ directory into it. Theme files take priority over plugin files.
simple-course-creator to the /wp-content/plugins/ directoryYes. If a post belongs to multiple courses, a separate course listing is displayed for each one. The position setting (above, below, both) applies to all listings.
Yes, several ways. Hooks — Add actions in your theme's functions.php to insert content at specific points in the output. Available hooks, in order of appearance:
scc_before_containerscc_container_topscc_below_titlescc_below_descriptionscc_before_togglescc_after_togglescc_above_listscc_before_list_item — receives $post_idscc_after_list_item — receives $post_idscc_below_listscc_container_bottomscc_after_containercourse_toggle filter (default: "full course").
The front display leading and trailing text are filterable via course_leading_text and course_trailing_text.
The post meta label text is filterable via written_by and written_on.
Template override — Create an scc_templates/ directory in your active theme and copy any files from includes/scc_templates/ into it. Your theme versions will take priority.
Customizer — Use the Simple Course Creator Design section in Appearance > Customize to adjust colors, borders, padding, and typography for all three output components.
Custom CSS — Write CSS in your theme targeting .scc-post-list, .scc-post-meta, and .scc-front-display. Each listing has a data-course-id attribute if you need to target a specific course box ([data-course-id="5"]). When a post belongs to multiple courses, each listing also carries the scc-multiple-courses class and all listings are wrapped in a .scc-course-group container.
Yes. The scc_add_to_styles action fires inside the generated <style> block. Hook into it to append additional CSS without opening a new style tag.
scc_post_types filter — register the course taxonomy on custom post types without touching the pluginscc-single-course class on course boxes that belong to a single-course post; scc-multiple-courses class on boxes that belong to a multi-course post.scc-course-group wrapper around all listings when a post belongs to more than one course#scc-wrap to .scc-post-list (breaking change — update any custom CSS targeting #scc-wrap)data-course-id="{term_id}" attribute for targeting individual courses with CSS ([data-course-id="5"])scc.css restructured as a self-documenting reference — every selector the plugin outputs is listed with plain-language commentsdisplay_position was set to "both" — IDs are not used on the container elementis_single() replaced with is_singular() throughout so the plugin works correctly on custom post type singular views<a href="#"> to <button type="button"> for correct semantics and accessibility; CSS reset in scc.css neutralizes theme button stylesreturn false in toggle JS replaced with e.preventDefault() — avoids unintended stopPropagation() side effect.scc-toggle-post-list::afterscc-output.php and scc-post-listing.js fully documented — hook reference, template variables, inline comments explaining each conditional block