How to add custom PHP in Joomla? How to add custom PHP in Joomla? php php

How to add custom PHP in Joomla?


I've needed to do this multiple times with Joomla, so I always go for Sourcerer. It's a free Plugin that allows you to add custom code, such as CSS, Javascript and PHP to articles. Below is an example of how easy it is to be done:

{source}<?php    echo '<p>';    echo 'Hello';    echo '</p>';?>{/source}


Is joomla seriously limited to only the extensions and modules that they already provide.

Absolutely not. Joomla is quite rich when it comes to customization. All those extensions and modules is something that people have created using the rich interfaces available.

The wealth of information is here.

In terms of customization there are 3 main things to look at:

Plugins - event driven and fairly easy to do

Modules - where you put small capabilities across your website; very easy to do

Components - definitely the most complex (don't start with this) but this will create the main functional unit. I use this for more complex applications

Your php experience will be put to good use.


turn off the editor first -> goto module manager -> add customHTML module -> paste your code (php, html, javascript, css etc) and save... nastiest and quickest way of doing what you want.

editor off because otherwise it'll clean up your code...

after that, try to create your own module/plugin to suit your needs (see links above @Tom), then make a lite and pro version and make money... all it needs is a good idea xD