WordPress Snippets

Add a column to the posts admin overview page.

How to add a custom column to the posts admin overview page. In this article we will have a look

WordPress Snippets

How to hide PHP Warnings and Notices in WordPress

PHP warnings and notices give useful information to the developers, but it’s not good for the users to see them.

WordPress Snippets

How to check if user is logged-in in WordPress

We already covered how to check if user is admin or has any other capabilities. This time we will cover

WordPress Snippets

How to check if user is administrator or editor in WordPress

WordPress has a build in function to check if the current logged-in user is whether administrator, editor or any other

WordPress Snippets

Adding menu’s to your WordPress theme

How to add menu’s to your WordPress theme? One of the most intricate parts of any website is good navigation.

WordPress Snippets

Changing the Gutenberg color palette

How to set custom colors on the Gutenberg color palette? The Gutenberg editor offers a great color palette with a

WordPress Snippets

Adding custom image sizes to you WordPress theme.

How to add custom image sizes to your WordPress theme. With this code snippet we are going to register some

WordPress Snippets

Setup Axios for the WordPress Rest Api

How to setup Axios with a Base url and Nonce for the Wp Rest Api When dealing with the WordPress

WordPress Snippets

Add custom (ACF) fields to the WordPress Rest Api.

How to add extra fields to the WordPress Rest Api While working on a different article about using the WordPress

WordPress Snippets

Custom Gutenberg gradient colors.

How to set custom gradient colors in Gutenberg. As of WordPress 5.4 gradient colors in Gutenberg are no longer marked

WordPress Snippets

Filter WordPress posts by (Acf) meta values

Getting a list of posts filtered by meta value Let’s say we have a tech blog where we have posts

WordPress Snippets

Custom Gutenberg font sizes

How to change the Gutenberg font sizes? With the code snippet below we add WordPress theme support for editor-font-sizes, and

WordPress Snippets

Using WordPress transients to cache data.

How to cache data using WordPress transients In the previous snippet we discussed how to use Php to fetch some

WordPress Snippets

Get and Post to remote Api with Php and WordPress.

How to make Get and Post requests to a remote Api with WordPress Php Sometimes you may want to make

WordPress Snippets

Conditionally loading a custom WordPress template.

How to conditionally load a different/custom template file. Adding custom template files for specific pages can easily be done in

WordPress Snippets

Custom WordPress Rest Api route

How to create a custom WordPress Rest Api route. The WordPress Rest Api has many build in endpoints for you