If a user is entering a phone number via an admin section, and you want to be able to hit that with some regex in order to turn it into a valid link. This example is using the “get_field” from the ACF api, but you can reference your variable how ever you’d like. |*|-php-|*| <a …continue reading
Category: Snippets
Small snippets of code to solve small problems
Alter elements in the DOM based on scrollTop position
A small script to make changes after the user has scrolled an x amount from the top, or returning to the top of the screen. An example would be the hamburger menu icon on this site. I’m applying a class to it after the visitor scrolls down to make the icon fixed, for easier accessibility. …continue reading