Changing the Template

If you want to make modifications to your theme files, you can edit them in WordPress's Theme Editor, as long as the theme files are writable by the web server process (see the "Setting File Upload Options" section in Chapter 14). To activate the Theme Editor, go to the Presentation administration page and click the Theme Editor tab. Make sure that the theme you want to edit (c3ro mask 2 in this example) is selected in the drop-down list.

Alternatively, you can edit the theme files on your machine with your favorite editor and upload them when you are ready. In both cases, you will want to make a backup copy, in case something goes wrong.

In this example, you will remove the list of buttons underneath the calendar and add a list of news stories using the RSS Link List plug-in introduced in Chapter 15. To remove the buttons from the rightmost column, choose the Main Template index.php from the drop-down list of theme files on the right side of the page. When that file loads, find the section of index.php that begins <div id="right">. Remove the code shown in Listing 16-2.

Listing 16-2. HTML Code to be Removed from index.php

<li><a class=' <li><a class=' <li><a class=' <li><a class=' <li><a class=' <li>

img img img img img href="http://www.rantradio.com/" title="listen"><img sr. href="http://www.thehungersite.com/" title="hunger"><im. href="http://www.eff.org/br/" title="speak"><img src="<. href="http://internetbrothers.com/aortal/" title="aorta. href="http://www.spreadfirefox.com/?q=affiliates&amp;id.

<input style="width:75px; font:bold 11px verdana, helvetica, sans-serif;. </form> </li> </ul> </div>

At this point, you are left with a section of the code that looks like Listing 16-3.

Listing 16-3. The Remains of the Right Column Code in index.php

<?php get_calendar(); ?> </div><!-- /side -->

If you check the blog now after saving and/or uploading your changed file, you will find the buttons have gone!

Was this article helpful?

0 0

Post a comment