Functions
A list of functions used in the theme and why.
kc_excerpt()
Kc_excerpt is a replacement for echo get_the_excerpt(); It grabs a post object and cuts it down to certain number of words definable as the functions only parameter ie.
kc_excerpt(20);Will give you the first 20 words of the post. This avoids words getting cut off half way through. It's not as precise for sizing of excerpts, but it does a good enough job. My implementation also calls the following function to remove visual composer shortcodes.
Used in:
theme/sensei/loop-course_all.php
theme/sensei/content-usercourses.php
That's all I know of as of Feb 7th 2020. I should really implement it everywhere excerpts are sold.
remove_vc_from_excerpt()
Uses preg_replace and defined patterns to detect and remove visual composer shortcodes. Original elision function mod by Paolo Rudelli.
Last updated
Was this helpful?