Category: Coding

Add a custom body class to your (Custom) Post Type

Add a custom body class to your (Custom) Post Type

There are many cases where you want to add a custom body class to your page, single post or custom post type. I’m here to show you some examples. By using the following code snippets, that you add to your functions.php, you can easily achieve that. The code above shows you how to add a […]

Simple ‘back to overview’ button with JavaScript

Simple ‘back to overview’ button with JavaScript

You’re probably here because you need a back button for your website and history.back(); just isn’t enough. But why use a button when you can use your browsers back button too. Well that’s easy. From A/B testing we noticed that every user has it’s own way to navigate your website. So it isn’t wrong to […]

Use WordPress shortcodes in navigation and sidebar widgets

Use WordPress shortcodes in navigation and sidebar widgets

You’re probably here because you noticed that your shortcode isn’t working, instead it’s just showing as text. No worries! This is by default. There is a quick fix for this. Imagine you want to show your related posts in the sidebar or social share icons in the navigation, or anything else that you created a […]

Create your own custom related posts for WordPress (No plugin)

Create your own custom related posts for WordPress (No plugin)

Creating your own Related posts for WordPress custom post types or for your blog isn’t that hard. You can use my example code below to set it up. Before we start, I assume you already have experience with editing PHP and working with your WordPress child theme. Okay, let’s get started. First we open our […]

How to Clone, Backup and Migrate your WordPress website

How to Clone, Backup and Migrate your WordPress website

There are a few cases where you want to create a duplicate of your existing website. Whether you’re switching webhosting, setting up a staging site or making a backup. Cloning your website will make an exact copy of the current state of your website including all the files, media, database and content. All tough it […]

Translate or replace text in WordPress via functions.php

Translate or replace text in WordPress via functions.php

You may want to translate or change some text on your WordPress site but you don’t want to mess around with string translations or editing the PO/MO files. Luckily there is an alternative way to do this. Quick and easy. All you have to do is add the code below in the functions.php file of […]