Tutorials & Guides, Freelance WordPress Developer | Page 13

Toggling Classes using JavaScript & Data Attributes

In this post, we’ll explore how to toggle CSS classes on HTML elements using JavaScript and data attributes. This approach keeps your JavaScript generic and reusable – instead of writing a separate click handler for every toggle, you define the [...]

How to Remove a Category from the Main Loop via functions.php

To remove a category from the main loop in WordPress, you need to modify the functions.php file of your theme. Here’s a step-by-step guide to accomplish this: Locate the functions.php File Go to your WordPress dashboard. Navigate to Appearance > [...]

Using the hreflang Attribute on Multilingual Websites

hreflang, which is also referred to as rel="alternate" hreflang="x", is a method in multi-language websites for marking pages that contain identical content but are intended for different languages and/or regions. It acts as a signal for search engines, telling them [...]

Adding and Managing Coupons in WooCommerce Stores

Coupons, in our case WooCommerce coupons, can boost sales in your online store. You can sell products faster, sell more products, and even increase traffic to your site using these coupons. Using coupons also allows you to improve brand awareness, [...]

Improve Frontend, Animations & Scrolling Performance

Whether you’ve noticed it or not, in recent years, the topic of optimization and performance of websites has become a hot topic. It primarily focuses on the loading time of websites and is achieved by reducing the overall weight of [...]

Load WordPress Plugins Selectively with Plugin Organizer

There are quite a few ways to improve the loading time of WordPress sites which I have written about in previous articles. However, there is one action I do not see being performed often by WordPress developers, which is selectively [...]

Creating Custom Meta Boxes with CMB2 in WordPress

CMB2 (Custom Meta Boxes 2) is a popular developer toolkit for creating metaboxes, custom fields, and forms in WordPress. If you’ve been using ACF for custom fields, CMB2 is worth knowing about – it takes a code-first approach that many [...]

Enable Ajax Add to Cart on Single WooCommerce Product Pages

By default, WooCommerce uses AJAX to add products to the cart on archive pages without a page reload. However, the add-to-cart button on single product pages triggers a full page refresh. This guide shows how to enable AJAX add-to-cart on [...]

Why your Business Need a Chatbot & Are all Bots Created Equal?

The year 2020 made most of us more isolated, whether we were sent to quarantine, found ourselves in government-imposed lockdowns, or were taking care of our parents and grandparents and avoiding meeting them to keep them healthy. This situation, a [...]