The other day I ran into an issue while deploying new code to the Dutch Hosting Platform Antagonist. It seemed like Symlinks were not refreshed when a new release was pushed, resulting into unexpected issues like broken links to assets and PHP code not updating. These issues were immediately resolved by changing the PHP version. […]
Only return zip/postal codes from Google Places AutoComplete Javascript API
It’s been a while, and it took me a while to get Google Maps Places to return only zip codes, so I’ll share a little code snippet so that you can fix it within a quick search!
Setup Mailcrab in Docker & PHP
Okay – it took me a while to get this configured correctly so I thought I’d share the setup with all of you. In the end, my issue was not setting -t -i in my sendmail path. Mailcrab Docker Compose setup Now, I run this in combination with a few PHP/WordPress containers, make sure that […]
Storing private data with SSH on WPEngine sites
I’ve been working with several clients hosted on WPEngine lately and whenever I start work on a site, the first step is usually rsyncing all data and running a wp db export with WP-CLI. Now, my go-to command is wp db export && mv *.sql ~/_sql/ and it worked. So the second step is an […]
Get the HTML content of a block edit page or post in WordPress
I’ve been searching for this for way too long, but this is the way to get the HTML output of a page in WordPress.
Rename Coupon code text to Discount code in Woocommerce
Another day, another snippet! This snippet allows you to replace all occurrences of the coupon word to something that you like better, like “discount code”. This code is highly inspired from the code shared in WPBeaches’ blog post. It’s customized for usage in classes, and optimized as some occurrences were not replaced and the “Click […]
Background-size cover in mPDF
It’s saturday today, and I found some time to work on some side projects.. This one is about generating PDF’s from HTML and.. I wanted to use a full-width background image that keeps the original ratio. Usually, it’s background-size: cover; that solves this, but not in mPDF.. In mPDF we use background-image-resize Really, that’s it. […]
WordPress.com SSH & duplicating a WordPress.com website locally
A while back, WordPress.com enabled SSH access for Business and eCommerce plans. I recently had a look at what those environments look like. First test: WP-CLI commands. It’s great to see that commands like wp db export work just fine. You’re also allowed to create folders in the home directory, so we can easily export […]
Hide the custom taxonomy metabox in the WordPress edit post screen
Since in this case i’m using ACF to define the taxonomies for a custom post type, I wanted to remove the metabox in the sidebar. Luckily, there’s no custom code required for this. We just need to set meta_box_cb to false. Did you know about show_admin_column as well? This argument allows you to show or […]
- « Previous Page
- 1
- 2
- 3
- 4
- …
- 12
- Next Page »