WordPress

Everybody knows WordPress. The famous open-source CMS (Content Management System) with the largest community on PHP programming language. There is a lot of themes and plugins available for it, for free and premium. Easy to use. Easy to develop.

It has great docs, coding standards, REST API, CLI, and more. There are a lot of tutorials out there, in text and also video based. Easy to troubleshoot because there is a lot of forums cover it.

In the last article, I gave some of my best practices in Pimcore, this time for WordPress. It is a single short article that (maybe) enough for you to start to use and develop a WordPress site.

First, you need to be at least an intermediate of these languages:

In WordPress, there are two areas to develop, called themes and plugins. Themes are the Front-End, and Plugins are to extend the WordPress functionality. Try to get used to with the Coding Standards. Maybe one day you will fall in love with WordPress and has a lot of businesses in it.

Theme Development

You should install some plugins that will help you to build the custom theme. You will work with Custom Post Types and Custom Fields. Some plugins that I recommend:

Theme Check is to guide you to follow the standard. You could see the official theme of WordPress for reference such as Twenty Nineteen.

There are two files required for a theme, index.php, and style.css. Theme Functions are in functions.php. Make sure that they are just theme related. To extend more, you should make plugins for that.

Keep following its security standards. Make your theme ready for i18n (internationalization). Test your theme. Make a child theme if you only want to change some small aspects.

Plugin Development

To start to develop a plugin, go to wp-content > plugins, make a folder with your plugin name, eg: plugin-name. Inside that folder, create a file with the name same as the parent folder, eg: plugin-name.php. After that, go to your admin panel, activate your new plugin, then it will be activated. Refer to this documentation.

Here are WordPress hooks documentation:

Maybe you need to install the plugin called Query Monitor. It would help you to debug your plugin.

User Perspective

I think those were short enough my tips for Theme and Plugin development of WordPress. Now, I cover about user perspective. I recommend these plugins for you:

  1. Jetpack
  2. Akismet Anti-Spam
  3. Yoast SEO
  4. W3 Total Cache
  5. WP Inquiries

Related Articles

Comments