How To Create A Simple WordPress Plugin From Scratch

How To Create A Simple WordPress Plugin From Scratch 2

It is not the first time it crossed my mind to create a WordPress plugin. Finally, no more procrastination as we loosely follow this simple YouTube guide (less than 10 minutes video) on how to do it. Is it really as simple to create as it sounds? Regardless, we should have no disillusion that there is no need for some coding knowledge for WordPress development.

The purpose of this post aimed at beginners is just to inspire or illustrate what is possible or the potential of a WordPress plugin developer can be, preferably for an online passive income source with recommendations.

For this short tutorial post, we will create a simple WordPress plugin to disable the admin bar (The black bar that appears at the top of the WordPress homepage for logged-on administrators). We can use a code editor. Free and popular ones can be Visual Studio Code, Atom, and Sublime Text. See if this excites or interests you more to go on.

So let us get started!

Why should we learn to create a WordPress plugin?

First, WordPress plugins help others. It can be satisfying without any expectation of rewards. Secondly, a good WordPress plugin can be a good foundation or even a whole business by itself. Some may sell PRO features of a plugin on their sites or a digital software shopping platform e.g. Codecanyon to set up your own online passive income stream.

How to create a simple WordPress plugin from scratch?

  • Head over to WordPress plugin Header (as Jakson highlighted at 2:48). Copy and paste the 3 lines of codes in enclosed PHP tags to any filename with a PHP extension e.g hello.php. Optionally, modify the name.
  • Copy the code from the code snippets page to the PHP file to disable the admin bar
  • Save and compress the file
  • Install and activate the WordPress plugin. Verify the admin bar is gone

WordPress plugin Header

This is all the code we need to create the minimum plugin!

WordPress plugin Header
WordPress plugin Header

Copy it from here. Paste it into an editor in an enclosed PHP tag, Modify accordingly the plugin name if you like.

Modified Hello PHP file in enclosed PHP tags
Modified Hello PHP file in enclosed PHP tags

Disable the admin bar

From the themeisle code snippet page, copy the codes for disabling the admin bar.

Disable the admin bar
Disable the admin bar
Added disabling admin bar code to PHP
Added disabling admin bar code to PHP

Save and compress the PHP file

Save and close the file. Right-click the PHP file and select Compress. We want a Zip file.

Compress PHP file to zip
Compress the PHP file to a Zip file

Install and activate the WordPress plugin

For example, we have an admin bar showing up on a WordPress site as shown.

Admin bar showing on the site
Admin bar showing on the site
Add a new WordPress plugin from the WordPress Dashboard
Add a new WordPress plugin from the WordPress Dashboard
Click upload plugin
Click Upload Plugin
Activate the plugin
Activate the plugin
Go to the homepage of the website
Go to the homepage of the website
Verify the admin bar is gone.
Verify the admin bar is gone.
Plugin look
Plugin look in the plugins page

If we deactivate it, the homepage should display the admin bar again.

How to become a professional WordPress developer?

If you are passionate about WordPress development, it may be worth your time to take a professional course or two.

I found this YouTube video with comments of people who found WordPress developer jobs because of this YouTuber and his WordPress Theme Development Playlist.

Positive jobs comments
Positive jobs comment about Brad and his WordPress Custom Theme Playlist
Brads WordPress Developer Udemy course
Brad’s WordPress Developer Udemy course

Another I feel comfortable recommending is good Domestika courses. Their popular courses tend to be high-rated and I concur after learning from a Doodles Art course. Below is one such WordPress Developer Domestika course. Notice the very high rating of over 150 reviews with almost 5000 students.

WordPress Theme Development Domestika Course
WordPress Theme Development Domestika Course

One page theme lovers may take a look here.

Conclusion

WordPress Plugins can also be a niche hobby or lucrative business e.g. Codecanyon WordPress Plugins (so does WordPress Themes).

Passive income endeavors are encouraged but WordPress developers can also earn from this niche skillset. For example, the top 2 bestsellers have 400K sales recorded each.

Codecanyon WordPress plugins bestsellers
Codecanyon WordPress plugins bestsellers

Hopefully this post has introduced, inspired, or offered some ideas about the potential and how to progress in WordPress development.

Good Passive

WordPress development can indeed be a possible source of online passive income for those willing to put in the time and energy to build good WordPress products that others are willing to pay for.

Be wholesome.

More Information

What are some resources to help WordPress developers?

How to create a WordPress theme?

This may help: How To Create A Simple One Page WordPress Theme

close
Good Passive Logo

Sign up to receive Good Passive content in your inbox.

We don’t spam! Read our privacy policy for more info.

Leave a Reply