A while back, I wrote about this amazing WordPress function that auto-links content in custom fields.
Up until today, I never had a reason to use it on regular, old WordPress content (i.e. the_content).
It turns out that you need to filter the_content function rather than wrap it in the make_clickable() function like we did with custom fields.
So, the solution is to add the following to your theme’s functions.php file:
// Make hyperlinks clickable even if the user doesn't add the html markup add_filter( 'the_content', 'make_clickable', 12 );
We use the priority of “12” so that it runs after shortcodes and other formatting stuff that naturally happens on the_content.
Pretty cool, eh?
Thanks to BetterWP.net for this solution.
More posts from themightymo.com
Today I ran the SEM Rush Log File Analyzer tool, and it showed some interesting things that are a complete waste of our Google Crawl Budget. Specifically, I learned that Google is wasting some of our crawl budget on the /wp-includes/ directory, certain plugin directories, and cache directories. I also noticed random files being crawled…
In the vast, evolving world of web development and analytics, keeping up with terminologies and tools can sometimes feel like trying to chase a mischievous cat in a maze. You think you’ve got a grip, only for it to slip right through your fingers! Enter the mysterious “Measurement ID” from Google Analytics 4 (GA4), a…
Yesterday I ran into an issue where I needed to convert .aiff files to .mp3. DBPowerAmp was recommended to me as a paid GUI tool. But I wanted something more lightweight, since this is a task I rarely need to do (most of the time, I’m already in Logic Pro, and exporting is simple there).…