Switching off the Lights - Adding Dark Mode to WordPress

Yesterday, 30 March, StackOverflow started to offer a dark theme version (still in beta) for their visitors. On their home page, you can read: “You’ve been asking for dark mode for years. The dark mode beta is finally here. Change your preferences any time.” More and More web apps are offering or considering to offer a “dark mode” layout to their visitors that comes together with their normal, “light mode” layout. Read More…

Shortcode to Display Recent Posts for Each Category in WordPress

Sometimes, you may need to add a section in your page that displays recent blog posts. WordPress homepage by default shows recent blog posts and nothing else. However, in most of the cases, the user would like to customize the homepage content to display other sections as well. In such cases, you can use the Gutenberg editor, the new core WordPress editor, since it has a lot of code blocks that are very handy and easy to use. Read More…

2 Ways to Reverse Post Order from a Specific Category in WordPress (With and Without a Plugin)

I had a client that needed to build an archive website for a museum. Needless to say, the museum had thousands of materials, seperated into categories and subcategories. Some of the subcategories needed to have a custom post order on the category archive page (by title or by published date in ascending order), while others should have been ordered with the default post order (date descending). In this tutorial, I will show you two ways how to sort the posts from a certain category archive page like a pro! Read More…

How To Easily Add Parent Category to the WordPress body class

I had a client that wanted to customize the category archives in such a way that they had different content and layout for all the child categories that belong to a certain parent category. For this, I needed a class name, so i can display it on the frontend and customize each child category’s archive page accordingly. In this tutorial, I will show you how to quickly assign the parent category id as a body class name to any WordPress child category’s archive page. Read More…

Shortcode for Recent Posts with Thumbnails in WordPress Without a Plugin

Sometimes, you may need to add a section in your page that displays your recent blog posts. This can be very useful for portfolio websites and it can be a nice addition to the home page. Normally, you can only add html inside your WordPress posts. However, with the help of shortcodes, you can add some programming logic and create custom content whereever you want. In this post, I will guide you through the process how to create a custom shortcode to display recent posts with thumbnails in WordPress. Read More…

Display Related Posts With Thumbnails in WordPress Without a Pugin

In this tutorial I am going to show you how to display related posts from the same category as the single post page in WordPress. Without the use of any plugins. The related posts are a great way to improve your website conversions (the time that your visitors spend on the website) and improve Google’s search rankings. In the past, I was using Yuzo Related Posts plugin. However, in the beginning of 2019, there was a vulnerability issue and it is no longer supported by the WordPress community. Read More…

Optimize Divi for Speed

Internet users these days do not have the patience to wait for a webpage to load. In fact, Google survey from 2016 figured out that 53% of mobile users abandon a webpage if it takes more than 3 seconds to load! It is obvious that faster websites improve customer satisfaction and provide better user experience. Then, why is the Divi theme so slow? Don’t get me wrong, I love Divi. Read More…

Display Cookie Notice in Your Divi Theme

In this tutorial, I will show you how to easily add a cookie notification popup to your Divi website. By the end of it, you will be able to display a cookie message on page load just the way I show it on my website. Now, let’s get on with it. (adsbygoogle = window.adsbygoogle || []).push({}); Why do you need cookie consent? Cookie consent is required by European Union’s General Data Protection Regulation (GDPR) and ePrivacy Directive (ePR). Read More…

Easy Way to Add a Cookie Popup in WordPress Without a Plugin

In this tutorial I am going to show you how to easily add a cookie notification popup to a WordPress website without installing any additional plugins. Don’t get me wrong – I like plugins and I use a few of them on my websites. They are one of the main reasons that made WordPress so popular in the first place. With a simple click you can extend your website’s functionalities and give an easy answer to a complex technical problem. Read More…

How to Remove Top Menu Transition Effect in Divi

The Divi theme is one of the most versatile WordPress premium themes with tons of options that also comes together with its powerful page builder. However, in some cases, you want to make some customizations and you simply cannot find a quick fix for them. An example for that is the Divi menu animation. The header always shrinks on page dropdown and while some may argue that this gives a modern feel to your Divi website, this transition effect is certainly not for everyone. Read More…