Developing a WordPress plugin like a component in Joomla

Prepare your custom widget, template function or shortcode.

By template function I mean something like this:

<?php function the_my_template_function(){ ?>
    <div>My content printed out</div>
<?php } ?>

which a WordPress user will call from it’s theme by inserting this piece of code into his theme:

<?php the_my_template_function(); ?>

It’s a common approach.