The three ways to add categories to pages in WordPress: with a plugin, by editing your theme’s functions.php, and by creating a custom plugin for the job.
Category: Web & Code
From HTML/CSS to PHP to cPanel. This is your first stop for web development help.
Remove Special Characters From a String in JavaScript
Remove special characters from any string with the String.replace() method and well-written RegEx. We show you how!
What Is a Data Layer?
A web developer’s introduction to the data layer, a must-have for advertising and marketing on websites and web applications.
Removing the Underline From Links in HTML
How to use CSS to remove the underlines from all links, groups of links, or specific links in your HTML document.
Event Listeners for Multiple Elements in JavaScript
Here’s how to add an event listener for multiple DOM elements in JavaScript.
How to Get the Href of a Clicked Link in JavaScript
Learn how to get the href attribute of any, or specific, clicked links in JavaScript.
How to Get the Class of a Clicked Element in JavaScript
Learn how to get the class of any, or specific, DOM element that the user clicks by creating an event listener.
How to Get the ID of a Clicked Element in JavaScript
Learn how to get the id of any, or specific, DOM element that the user clicks by creating an event listener.
Array to String Without Commas in JavaScript
How to convert an array into a string without commas with the Array.join() method in JavaScript.
How to Run JavaScript on a Mac (4 Ways)
Want to run JavaScript code on your Mac? Here’s how to do it in the Terminal and from your browser.
Removing All Commas From a String in JavaScript
So you need to remove commas from a string in JavaScript? These are the two best ways to achieve this.
Create an Array of Images in JavaScript (Tutorial)
The best ways to create and use arrays of images in JavaScript.
Check If a Button Is Clicked in JavaScript
This is the best way to listen to click events for a button element.
Is Inline JavaScript Bad?
Wondering whether to inline your JavaScript code or load it externally from a file? We help you decide.
Why Is My JavaScript Not Working? (With Examples)
We round up the most common causes for your JavaScript code not working.
Log the User Out on Closing the Browser in JavaScript
Want to log out your user after they’ve closed the tab or window? Here’s how you could do this in JavaScript.
Set an Attribute Without a Value in JavaScript
The best ways to set an empty attribute to one or multiple DOM elements in your HTML markup, with plain JavaScript.
Remove Quotes From String in JavaScript
We look at the simplest, most straightforward way to remove quotes from a string in JavaScript.
Pass PHP Array to JavaScript (Tutorial)
It turns out you can get PHP and JavaScript to agree on something, and that something is the JSON data format.
Nested Arrays in JavaScript, Explained
You asked for it, we delivered. We explain nested arrays in a way that anyone, from beginner to expert, can understand.
How to Initialize an Empty Array in PHP
These are the two best ways to initialize an empty array in PHP.
How to Declare an Empty Array in JavaScript
Here’s how to declare an empty array object in JavaScript—and what you need to do so that it meets your needs.
Function Not Defined in JavaScript (How to Fix It)
ReferenceErrors are annoying. These common mistakes and clues to look for will help you get to the meat of it.
Alphabet Array in JavaScript (Tutorial)
The simplest, most straightforward ways to create an array of letters in the English alphabet in JavaScript.
Find the Largest Number in an Array in JavaScript
The quick and easy way to find the largest number in an array in JavaScript.
Quotes Within Quotes Within Quotes in JavaScript
There’s a way to nest string in two or more quotes in JavaScript, and you will love the simplicity of it.
Check If a Variable Is a String in PHP
The best way to check if a variable is a string or not in PHP.
How to Add a New Line in PHP (Line Breaks, Explained)
We explore some of the best ways to add a line break to a string in your PHP code.
Calling a JavaScript Function From PHP?
Trying to call a JavaScript function from PHP? Nine times out of ten, you will want to do this instead.
Adding a New Line in JavaScript (Tutorial)
Still learning? These are the best ways to add a new line to your JavaScript code’s output.
How to Repeat a String in JavaScript (Tutorial)
In JavaScript, it’s easier to repeat a string an n number of times than you probably think. Here’s how to do it.
Check If an Element Has a Class in JavaScript
So you’re looking for a good way to check if a DOM element has a CSS class in JavaScript?
How to Edit Categories in WordPress
Everything you need to know about editing categories in WordPress, from simple to advanced use cases.
Remove the Post Date in WordPress (Tutorial)
So you want to remove the dates on your posts because you’re publishing evergreen content? I show you how.
How to Remove “Leave a Reply” From WordPress
Don’t want the “Leave a Reply” section under the posts on your blog? Here’s how to get rid of it.
Check If String Is Empty in JavaScript
Find out the two best ways to check whether a string is empty or not in JavaScript.
How to Check If a File Exists in PHP
The best way to check if a file or directory exists in your PHP application.
Do This Before Registering a Domain Name
Adding a domain name to your cart and hitting that “Buy” button is easy. Switching from an ill-picked domain name after you’ve built a site on it isn’t.
Should Web Developers Use WordPress?
The fact that you can build a website from scratch doesn’t mean you should. Here are a few reasons why—and why not to—consider WordPress.
Will Updating WordPress Break Your Site?
WordPress updates keep your website stable, secure, and performant. But can they break it? And, if that happens, what can you do about it?
The Biggest Disadvantages of WordPress
I’ve been building websites with WordPress since it came out in 2003. Here’s what I consider to be its biggest disadvantages.
Is WordPress Easy to Use?
Where Is the WordPress Admin Panel?
Does WordPress Require Coding?
Will WordPress Replace Web Developers?
No, WordPress won’t replace web developers. If nothing else, it will create opportunities and work for WordPress developers.
Does WordPress Require Hosting?
Yes, WordPress requires hosting to power your website. Without it, it’s just a bunch of files in a folder on your computer.
How to Change the Yoast SEO Breadcrumb of a Post
Here’s how I managed to change the Yoast SEO breadcrumb of a WordPress post that had already been published.