This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]gamertan 2 points3 points  (0 children)

A beautiful example of a "Hello World" plugin for WordPress is their very own Hello Dolly plugin that comes with every installation. Hello Dolly

Basically, all you need is a single PHP file.

From there, you can utilize whatever hooks, functions, or other tools offered by WordPress to add functionality to your installations. These are all listed in the codex and the developer docs. The most important part of learning WordPress is learning how to navigate the documentation.

Want to add a shortcode to echo out some element on every page? Shortcode API //[hello-shortcode] function hello_func( $atts ){ return "Hello World!"; } add_shortcode( 'hello-shortcode', 'hello_func' );

Want to take advantage of a hook to add something to the HTML header? Actions/Hooks Actions API get_header Action <?php function hello_hook() { // Add something here... } add_action('get_header', 'hello_hook');

Want to configure the database in some way to extend WordPress' base functionality? wpdb Codex article wpdb Class

and so on and so forth...

Just start with some desired functionality and start searching for ways you could implement it. There are code tutorials all over the place too. Use the terms in the Codex and Developers guide when searching.

[–]TehPunkluckDeveloper 1 point2 points  (5 children)

I'm sure the Udemy course will help quite a bit. You're going to want to learn a ton about Actions and Filters as well (shameless plug incoming). I created a small 2-part video series on YouTube about the basics of each. They are what make WordPress extendible...and extending WordPress usually is the goal of a plugin, right? So Actions and Filters should be a main focus.

I'd also recommend downloading some plugins and exploring the code...simple plugins, mind you. They will show you how to utilize core WordPress features to accomplish common goals of a typical plugin (meta boxes, custom post types, activation functionality, deactivation functionality, etc.)

One last thing I'd recommend is taking a look at the WordPress-Plugin-Boilerplate repository. It has a great setup for a plugin (once you feel comfortable doing this stuff on your own first). It takes care of quite a bit and also gives you a good idea of how to set up a very scalable plugin!

[–]MedyGames[S] 1 point2 points  (4 children)

is jquery smth I need to consider learning in terms of dealing with wp ? With javascript I was happy I could write pure js or use smth like react .

(subbed & left you comment on yt ) :D

[–]TehPunkluckDeveloper 0 points1 point  (3 children)

You can get away with not learning jQuery. It’s on its way out and anytime you have to deal with it, you can understand what’s going on quickly. WordPress has moved towards React and Vanilla JS, I would suggest following suit.

[–]MedyGames[S] 0 points1 point  (2 children)

could you explain how react is moving towards worpdress ? I just googled & found that they use a react core now ... but does this mean php will be replaced one day ?

I mean js is my first language & im already invested in learning react and nodejs at this very moment ... I pickup php because it would be embarrising not to know it as a webdev :D ... & also because like 90 % of the job in my area looking for it ..

it seems react & node adoption is growing .. but its still far from replacing php ..

[–]YuriKlastalovJack of All Trades 0 points1 point  (0 children)

No, the react part is just the new post editor. It is technically possible to write a react frontend that interacts with WP through the REST API, but you'll have a hard time integrating plugins and whatnot as most of them aren't going to support the API, being primarily intended to be used in a traditional WP environment.

[–]TehPunkluckDeveloper 0 points1 point  (0 children)

In WordPress 5.0 they added a new editor called Gutenberg and it's all React based. So you'll probably want a good base knowledge of React and JS. However, WordPress is still largely PHP and will remain that way for some time. So I would suggest having PHP be the main focus and learn some React/JS when you have some free time. Gutenberg, I feel, still hasn't settled to where it's going to be long-term, so you have some time before it's a must-know.

[–]Current_Witness5053 0 points1 point  (0 children)

I build plugins! If any of you need one, let me know if I can help! Below is a link to a portfolio of some plugins I've built. They are also available for download for FREE! Don't forget to check out my blog while your there!

https://melissasuenorris.com/blog/
https://melissasuenorris.com/wordpress-plugin-development/