Honestly, whenever possible – I avoid the need to share media between sites but.. in this case a lot of the same media exists on multiple sites. And the hosting we’re eyeing on charges per 5GB. With a 12GB media library we want to optimise this in whatever ways possible. Soo.. Let’s have a look […]
Post Type missing in WP_Query or get_posts (Polylang?)
When querying multiple post_types via get_posts, there was one specific post type that didn’t show up in combination with posts or pages. Querying only that specific post type worked fine, but the combination failed, every – single – time. After running the same arguments in a WP_Query and checking out the SQL that it used […]
Overriding the Gravity Forms submit button
I recently setup a Gravity Forms form that generates a zip download on submission. Whenever someone hits ‘submit’, a ZIP is generated based on user values. This works by hooking into gform_confirmation and returning a header(‘content-disposition: attachment; filename=file.zip’);. The entry is created, the zip download starts but.. the form becomes unusable afterwards. You cannot generate […]
Auto reload a python script on file change using nodemon
I’m working on a Discord bot with a friend of mine which runs on Python. I’m quite unfamiliar with the language but it bothered me that each time I make a change in code, I need to to restart the bot completely. I did some research and it didn’t seem like there were a lot […]
Creating a WordPress Sandbox environment that resets hourly with Cloudways
I’ve had multiple occasions where I just wanted to try something on a clean install in WordPress. Today we’re setting this up in Cloudways. Don’t have a server running yet? Click here to get started: https://www.cloudways.com/en/?id=713055 (yup, that’s an affiliate link) My requirements An environment that resets itself every hour The database is reset, as […]
Page templates not appearing in your Genesis child theme?
I just spend 15 minutes researching why my custom page template wouldn’t appear in page attributes. Everything was set correctly.. except for one thing. I hope you land here if you experience this issue, and I also hope that your child theme doesn’t contain an index.php file, because this is the fix. Make sure your […]
WordPress Cronjobs in Multisite
It’s always better to add a cronjob for running WordPress’ cronjobs. If you don’t, you’re dependent on website visits to launch cronjobs. Luckily we have wp-cli for that, the wp cron event run –due-now command will process any cronjobs in queue. If you add this to your crontab, you’re all set. Except for multisite Each […]
Permission issues with docker compose? Here’s a fix.
I’m fairly new to docker-compose but did manage to run all my local development on docker containers recently. I even setup a mini-PC that runs all these environments and allows met to quickly spin up new websites (literally seconds). Oh and did I mention that all of the websites are accessible from any device within […]
ACF: Load and save fields to a custom plugin
It’s not always that you want to save your ACF-JSON fields to your theme folder, like when you’re creating a custom plugin for a new client that depends on ACF, or when using a theme that’s not within your development. For these cases ACF has a nice function; you can filter it so that it […]
- « Previous Page
- 1
- …
- 8
- 9
- 10
- 11
- 12
- Next Page »