Tag: wordpress
How to use TypeScript with WordPress Blocks and the Gutenberg environment. Covers config changes, necessary dependencies, and some possible issues.
A reusable method for adding arbitrary extra HTML attributes to enqueued styles and scripts in WordPress, using add_data and filters.
I recently wanted to force WordPress to make all my <script> and stylesheet (<link>) tags load relative URLs instead of absolute URLs, and ended up learning a bit about the internals of WordPress (probably more than I wanted to know). For reference, I wanted to turn this: <link rel=’stylesheet’ id=’joshuatzwp-style-css’ href=’http://joshuatz-wp.test/wp-content/themes/joshuatzwp/style.css‘ type=’text/css’ media=’all’ /> Into […]
An exercise in modifying the script and style tag HTML output by WordPress from enqueue, in order to add async, defer, and lazy loading attributes to resources.
The custom WordPress theme that powers both the styling behind this site, as well as a lot of back-end logic that controls indexing, redirects, and more.