gregrickaby.com
Filter and clean the Archive Title - Greg Rickaby
This client wanted to feature their archive titles in a large hero area. The PSD excluded the prefixes like, “Category:”, “Tag:”, “Author:”, etc… The snippet below allows you to strip out the prefixes used in the get_the_archive_title(); function, as well as any HTML tags. Jeremy Pry helped me solve this by inserting this regular expression into PHP’s preg_replace(); … Continue reading "Filter and clean the Archive Title"