Categories
Uncategorized

How To Create A Simple AJAX Request

The creation of an AJAX request can be divided into four steps: Create an XMLHttpRequest Object Create a callback function Open the request Send the request Let’s say we have an index.html file as follows: It currently does nothing, except displaying a button on the page. That button triggers the function send_AJAX() but it isn’t […]

Categories
Uncategorized

Linux Notes

This post is a compilation of some of the notes I made about Linux commands. I usually come back to it for reference. I think it could be helpful to others as well. Packages To quickly check if a program is installed on Linux, you can use the command dpkg -s followed by the unique […]

Categories
Uncategorized

How To Replace A Word In WordPress Posts

In the previous post, you created your very first WordPress plugin. Now let’s make it do something! How about changing occurrence of a particular word in posts/pages with something else? For instance, let’s replace pluto with pluto (not a planet). It can be achieved by adding the code below to the plugin file you created […]

Categories
Uncategorized

How To Create A WordPress Plugin In 10 Minutes

There are plenty of similar posts available all over the internet so I’ll try to keep this short and to the point. Local Developer Environment To create a WordPress plugin, first you’ll want to setup a WP developer environment. There are many options but I recommend using VVV (Varying Vagrant Vagrants). The installation is quite […]

Categories
Uncategorized

Switched To DigitalOcean From BlueHost Shared Hosting

Today I switched my WordPress site to DigitalOcean (from BlueHost Shared Hosting), using their trial $100 for 60 days offer and I must say I’m impressed with the blazing fast page speed. Here’s a comparison to illustrate what I mean by blazing fast page speed – On BlueHost shared hosting: On DigitalOcean basic droplet ($5/month): […]

Categories
Uncategorized

Tags VS Categories In WordPress

I’ve always been confused with tags and categories in WordPress. I know what they are but I always found myself conflicted between what to use to organize my content in the best possible way. I finally figured that I can leave categories alone for now and just move my focus completely on tagging my posts. […]

Categories
Uncategorized

Git Shows That All Files Have Been Modified (mode Issue)

When I opened the (WooCommerce) project directory, I noticed a sign (lightening bolt ⚡️) in the terminal which means something has been changed. I did a git status and noticed that every single file has been modified, except that the content of each file was the same because I had never touched those: I did […]

Categories
Uncategorized

Amending Last Commit

Let’s say you made a few code standard fixes and committed them as “Fix code standard issues”. Now you find some more code standard issues and fix those as well. You now have the option to make another commit with “Fix code standard issues” or you could amend the previous commit to include the newly […]

Categories
Uncategorized

Change The Excerpt Length Of Your WordPress Posts

This is fairly easy to do with the help of a filter called excerpt_length. This piece of code can be added to the functions.php file of your theme OR it can be added to your site via a plugin called Code Snippets. What does it do? In simple words, it creates a function that accepts […]

Categories
Uncategorized

How I Joined Automattic As A Happiness Engineer

Automattic, the parent company of WordPress.com, Jetpack, WooCommerce (and a couple of other products) is one of the best fully remote company to work for and almost half of its workforce is technical support (i.e. Happiness Engineering). I had some experience working with WordPress, running my own site both on WordPress.com and self-hosted setup and […]