fbpx

Tips, tricks, and other valuable WordPress knowledge to save you time and make you money!

Blog

INSERT INTO SQL

I often forget what the INSERT SQL statement format is when I’m adding fields to different MySQL tables. Use the command below to insert a record into your table: INSERT INTO <table-name> (field1, field2) VALUES (‘field1 value’, ‘field2 value’); For example, let’s say you need to add a record to the users table. Simply use…

How to check if a string contains a substring in JavaScript?

There are two simple ways to check if a string contains a substring in JavaScript. One of the ways is done using the includes method for JavaScript 6 (ECMAScript 6) and the other is with the indexOf for JavaScript 5 (ECMAScript 5) or older. Option 1: Use the includes Method (ECMAScript 6) The code snippet…

How to Block Online Ads and Trackers?

Could you get more sick of online ads and trackers? I can tell you that I can’t. Ads suck up your bandwidth and make for worse user experiences on countless websites that I frequent. And, as a developer, I’m conscious of my privacy while browsing and want to limit the data that I provide to…

How do I change an existing Git commit message?

In order to change an existing Git commit message, the easiest way to do it is to simply run the following command (where New commit message is your new message): git commit –amend -m “New commit message” If you would like to be able to adjust a multi-line commit message, use the following command: git…

What are the 16 Most Important SEO Tips for a Blog?

We found the process of generating organic traffic to our blog a little opaque and overwhelming despite the plethora of search engine optimization articles out there. There are a ton of different search engine optimization (SEO) tips that help you get more traffic to your blog but we compiled our list of the 16 most…

Delete a Column SQL

In order to delete a column from a table using SQL (Structured Query Language), you need to run the following SQL query: ALTER TABLE <table-name> DROP COLUMN <column-name>; For example, let’s say that you have table name called users that has the following fields: id, first_name, last_name, middle_name, email, phone If you would like to…

Redirect to Another page using JavaScript

There are three ways to redirect to another page using JavaScript. Option 1: Use window.location.replace The JavaScript code below will redirect the user to the URL specified. According to Mozilla, the replace method “replaces the current resource with the one at the provided URL” (Source). Replace removes the current document’s URL from the user’s history,…

How to rename a local Git branch?

Renaming a Git repository’s local branch can be accomplished using the following command: git branch -m <oldname> <newname> For example, if you want to rename the branch called topic/wip to topic, run the command below: git branch -m topic/wip topic If you would like to rename the Git branch that you’re currently working on, use…

How to delete a Git branch locally and remotely?

In order to delete a Git branch locally and remotely, you need to run the following commands: Delete a Git branch Locally You can use -D instead of -d to force the branch deletion without checking the merged status. git branch -d <branch_name> For example, if you would like to remove the topic/wip branch locally, run the…

How to undo the most recent local commits in Git?

If you’ve ever wanted to undo the most recent local commits in Git before pushing your changes to production, you’ve come to the right place. There are two options to do this; both options reset the Git repository’s branch but one discards all of the changes while the other leaves the changes staged. Option 1:…

Want to use our API?