Posts about: WordPress Development | Page 5

Introduction to Variable Fonts – The Future of Web Fonts

Typography has interested me since I started developing websites and getting into design, even before there was widespread use of web fonts. And although web fonts have been around for almost ten years now, we’ve always had to balance between [...]

Transfer data from ACF to JS with wp_localize_script

One of the challenges you’ll encounter when developing WordPress themes is making server-side data (accessible via PHP) available in your JavaScript files. For example, you might have a popup whose message should be translatable, or an AJAX request that needs [...]

How to Install Tailwind CSS in Your WordPress Theme

This guide will walk you through installing and configuring Tailwind CSS in WordPress themes. The process is straightforward, so I’ve put together a concise guide to help you get started. But before diving into the steps, let’s briefly explore what [...]

WP_Query – Filter Posts by Meta Fields

This post assumes you have basic knowledge of the WP_Query class in WordPress. I’ll start with some basic examples similar to those in the WordPress Codex, then move to the real power: meta_query. These examples are relevant when you want [...]

The Hierarchy of Page Templates in WordPress

If you develop WordPress themes or use child themes to customize an existing one, you’ll eventually need to understand how the template hierarchy works. The hierarchy determines which template file WordPress loads for each type of content – posts, pages, [...]

Show the Total Number of Comments in WordPress Templates

In WordPress, there is a built-in function called wp_count_comments that allows you to get the total number of comments for a specific post based on its ID. The function returns the total number of pending comments, approved comments, spam comments, [...]

A Few Ways to Disable Gutenberg in WordPress

Since WordPress 5.0, the Gutenberg block editor has been the default content editor. While it offers powerful block-based editing, many developers and site owners prefer the classic editing experience for existing projects, client sites, or workflow compatibility. All the methods [...]

How to Register ACF Fields Using PHP in WordPress

Registering ACF fields using PHP reduces the number of database reads and enables the use of Version Control like GIT and similar. The option to define fields via code decreases the chance of losing information that exists in a normal [...]

Show Posts from another Blog using REST API

As you probably already heard, REST API provides you with the ability to interact with your WordPress site externally, for example, from a mobile application or another website. Let’s look at a short code example that describes how you can [...]

Why You Should Use WP_DEBUG_LOG in WordPress Development

In this short post, we’ll see what the correct way is to monitor PHP errors on WordPress sites using WP_DEBUG_LOG. Like most things related to WordPress development, the best way to understand a specific function is to search for it [...]