Use Javascript or PHP in a Joomla Article

| Joomla

Normally in a Joomla article, code such as Javascript or PHP will not work. This is for good security reasons. People could do a lot of harm if they were free to use these inside your articles. However, many advanced users need to use such code. This tutorial will show you how to do it:

Download the Sourcerer Plugin


Go to the Joomla Extensions Directory and find Sourcerer:
Click on the "Download" link and you'll be taken to the developer's website where you can download Sourcerer.

Upload and Install Sourcerer


In the Administrator area of your Joomla site, click "Extensions" then "Install/Uninstall". Click "Browse" to find the Sourcerer plugin and think click "Upload File & Install"

Create a New Article


Click "Content" then "Article Manager" and then "New"

Scroll to the Bottom of the Article


Click on the new "Insert Code" at the bottom of the article.

Pop-Up Box


You can write your code directly into this box. Just make sure that code has the normal opening and closing tags. When you're done, click "Insert" in the top-right corner.

Save the Article


Don't make any changes to the code you've created. Save the article with the editor turned on and all the code in between the opening { source } and closing { /source } tags.