Posts

Advanced Custom Fields + Emojis

The challenge: Figure out why Advanced Custom Fields in wordpress didn't save emojis. The stakeholder: My fun SEO coworker who wants to shove emojis into ld+json for the chance at ranking higher in google search results. This was a fun problem to work on. I've had an growing interest in SEO for a while now. While I prefer generating ld+json on the component level when I can, sometimes the SEO's want a lot more control. How much control they get is contingent on the tools we provide for them. I this case it was a simple textarea ACF field. The problem?: ACF fields don't currently handle special characters very well -- that goes for things like ™ or 🤡. The approach: My search led me to two paths. The first path was changing the formatting rules of the entire database. This is a site with a long history and hundreds of posts. Not gonna take that risk just to shove a fire extinguisher emoji into some ld+json. The other option is to take the data before it's ...