Marinus Klasen

Marinus Klasen

  • WordStress
  • Development
  • Consultancy
  • Developer Resources
  • Blog
  • Contact

Detecting the user’s global location using javascript

August 16, 2022

A while back I wanted to show/hide a box on my website based on the location of the visitor. There’s a couple of options to get the user location: Use an API which you send the IP address to and get a location back (find services by googling “geolocation ip address api”) Ask for the […]

Continue Reading

Prevent WordPress update nag in custom WordPress plugins and themes using the Update URI header

August 16, 2022

As the WordPress Plugin and Theme repositories are growing the names of custom plugins and themes are running out. What if you create a theme or plugin with a name that’s already used in the WordPress repository? In that case, WordPress will ask you to update it, and that could lead to disastrous events. Since […]

Continue Reading

Mariadb in docker fails to start, keeps restarting

August 12, 2022

Lately I’ve seen errors in my local development environments: This causes my database container to get stuck in a restarting loop. The fix? Downgrade the mariadb version! The database part of docker compose was configured like this: The version used on my system is mariadb 10.8.3, apparently that version can cause issues like this. After […]

Continue Reading

Transfer and copy files between git branches

August 10, 2022

Ever find yourself in a spot where you need to integrate work from another branch into your current branch? Well.. I was surprised to find out it’s much easier than I expected! It’s literally nothing more than the command below Thought I’d share this little snippet with all of you, Happy developing!

Continue Reading

Find the largest tables in your database

August 9, 2022

Here’s an quick and easy SQL query for finding the tables that take most space in your database. Running a WordPress website? Want to run it in WP CLI? Then use it like:

Continue Reading

Dump / pretty print a JSON object in React

July 28, 2022

To quickly debug something, or temporarily show the data object during development, just to know what you’re working with, it comes in handy to print the full JSON object. Not as a string that’s almost impossible to read, but as a well formatted array. We’ve got a neat little one-liner for that, which I’ll share […]

Continue Reading

Updating custom post meta via the WordPress REST API

July 24, 2022

When working with the WordPress REST API we sometimes have to update custom post meta for a (custom post type) post. In my case, I am using the available REST endpoints but I did want to add some extra data to the GET request, and wanted to make it possible to update that data as […]

Continue Reading

Updating a post in WordPress using Fetch

July 23, 2022

In this post we’ll go through the steps of updating a post in WordPress using the Fetch API in Javascript. We’ll focus on authenticated users in the front or backend of WordPress and use the nonce that’s available on every page. A snippet to update a post in the WordPress REST API In the snippet […]

Continue Reading

Get the current taxonomy ID in WordPress

July 20, 2022

Another short snippet-style article for today; How do you get the current term or taxonomy object in WordPress? Sometimes, when developing plugins or themes, you need to get more details on the current term page the website visitor is looking at. We can load term meta by using get_term_meta functions, but what if we want […]

Continue Reading
  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 12
  • Next Page »

Get in touch

Contact me using the details below

Marinus Klasen

Wilhelmina van Pruisenweg 35, 2595 AN Den Haag

marinus@mklasen.com
twitter.com/marinusklasen
linkedin.com/in/marinusklasen

  • GitHub
  • LinkedIn
  • Twitter

Have you read?

  • Elementor Widget UsageMarch 27, 2025
  • Programmatically showing popups with ElementorMarch 25, 2025
  • The Elementor sanitize_settings errorSeptember 12, 2024
  • Announcing.. Wooping Shop Health!June 13, 2024
  • Swiper setup when using wp-scriptsMarch 14, 2024

Copyright © 2025 ยท Marinus Klasen | Webdesign by Team Rood