Edit your index.php in Joomla
Sometimes you just have to fuck with the code. Instead of having to log in to your server and screw with it directly in a Linux editor, it’s SO much easier to just use the back-end of Joomla to get the job done.
The FIRST thing you should do is backup your site. Then:
Go to Extensions → Template Manager → Templates (on the left) → Click the Details and Files link for the template you want to edit → Edit main page template
This opens up your index.php file in a rather nice editor. You may now completely screw up your site – so BE CAREFUL, but don’t be afraid to try shit out.