
Pearl & Plugins
This theme uses certain Wordpress plugins that you will need to download and activate. The one that isn’t listed on the download page for this theme is Related Posts. ((or if that site is down, download it by clicking here))
OK, so let’s take a look at the few faults of this theme and how we can work around them.
Multiple Posts
1. When you post multiple entries in one day, you will get double posting of the headlines below the original post.
Original code from file Main Index Template:
<div class=”rightmeta”><span class=”metcomments”><?php comments_popup_link(’No Comments’, ‘1 Comment’, ‘% Comments’); ?></span> <strong> | </strong> <span class=”permalinks”><a href=”<?php the_permalink() ?>”>Finish Reading “<?php the_title(); ?>”</a></span></div>
<div class=”clear”></div>
</div>
<div id=”recent”>
<ul class=”recentn”>
<?php $posts = get_posts(’numberposts=5&offset=1′);
foreach($posts as $post):
setup_postdata($post);
?>
Everything in the Recent div class is what causes the headlines to appear below the entry. What we want to do is copy everything from <div id=”recent”> to ?> and place it in a new file. I called it “recente.php”. Now place that file in the theme folder, and find the following snippet of code.
Original Code from file Main Index Template:
<?php endif; ?>
<?php include (TEMPLATEPATH . "/flickrbar.php"); ?>
<?php include (TEMPLATEPATH . "/bottombar.php"); ?>
</div>
Change this to:
<?php endif; ?>
<?php include (TEMPLATEPATH . "/recente.php"); ?>
<?php include (TEMPLATEPATH . "/flickrbar.php"); ?>
<?php include (TEMPLATEPATH . "/bottombar.php"); ?>
</div>
There is still one minor flaw: The headlines shown will only exclude the first post on the page, not the second or third. There is no work around, unless you have a set number of posts that you do a day.
So let’s say you plan to do 5 posts per day. All you would have to do is change the offset=1 to offset=5, although it would only link to the 6th post with no break in post flow after you have posted those 5 posts. Personally, I’d just leave it like it is.
Widgets
2. You don’t want to use widgets in the sidebar.
Easy.
Original code from file sidebar:
<?php /*------------------- widget's for the homepage ------------------*/ ?>
...
<?php } ?>*/ ?>
Just erase everything from <?php /*——————- widget’s for the homepage ——————*/ ?> to <?php } ?>*/ ?> and replace it with your own sidebar HTML/PHP.
Alternatively, if you would like to use widgets, but want to add things that widgets will not, here is an example of my sidebar for my homepage:
Mod’d code from file sidebar:
<?php /*------------------- widget's for the homepage ------------------*/ ?>
<?php if (is_home()) { ?>
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar('home') ) ?>
<br /><br />
<h3>Front page material</h3>
<ul>
<li><a href="http://scarform.com/blog/who-is-matthew-trevino/">Who is Matthew Trevino?</a></li>
<li><a href="http://scarform.com/blog/donate/">Support Scarform.com</a></li>
<li><a href="mailto:boyevul@gmail.com">Contact me via email</a></li>
<li><a href="http://www.gvisit.com/map.php?sid=6de891d909b5be2db8731c8af1827a5d">Gvisit Map</a></li>
</ul>
<br /><br />
<h3>Sites I enjoy</h3>
<table width="100%" border="0">
<tr>
<td><a href="http://blog.dreamhost.com/">Dreamhost</a></td>
<td><a href="http://www.problogger.net/">ProBlogger</a></td>
</tr><tr>
<td><a href="http://www.amsterdamn.org/">Amsterdamn</a></td>
<td><a href="http://www.bloggingpro.com/">BloggingPro</a></td>
</tr><tr>
<td><a href="http://www.kineda.com/">Kineda</a></td>
<td><a href="http://lolitron.org/">Lolitron</a></td>
</tr><tr>
<td><a href="http://www.newscientist.com/">NewScientist</a></td>
<td><a href="http://kottke.org/">Kottke</a></td>
</tr><tr>
<td><a href="http://lostsockland.com/julia">Julia</a></td>
<td><a href="http://forevergeek.com/">ForeverGeek</a></td>
</tr><tr>
<td><a href="http://www.at0mica.net/">At0mica</a></td>
<td><a href="http://boingboing.net/">BoingBoing</a></td>
</tr>
<tr>
<td><a href="http://www.mistakesofyouth.com/">Mistakesofyouth</a></td>
<td><a href="http://ctrlaltdel-online.com">CtrlAltDel</a></td>
</tr>
<tr>
<td><a href="http://lorelle.wordpress.com/">Lorelle</a></td>
<td><a href="http://fark.com">Fark</a></td>
</tr>
<tr>
<td><a href="http://digg.com">Digg</a></td>
<td><a href="http://wordpress.org/development/">Wordpress Blog</a></td>
</tr>
</table>
<br /><br />
<h3>Sites I Promote</h3>
<table width="100%" border="0">
<tr>
<td><a href="http://www.dreamhost.com/r.cgi?234921" title="Recommended Webhost">Dreamhost</a></td>
<td><a href="http://suicidegirls.com/join/GMXAGL/" title="Punk Goth Chicks">Suicide Girls</a></td>
</tr>
<tr>
<td><a href="http://www.tshirthell.com/store/clicks.php?partner=boyevul" title="Kick ass shirts">Tshirt Hell</a></td>
<td><a href="http://tinyurl.com/ynjxvq" title="Get paid to blog about you like to blog about!">Payperpost</a></td>
</tr>
</table>
<br /><br />
<div align="center">
<a href="http://www.blogtopsites.com/entertainment/"><img style="border:none;" src="http://www.blogtopsites.com/track_34511.gif" alt="Entertainment Blogs - Blog Top Sites" /></a><script src="http://links.blogtopsites.com/links_34511.js" type="text/javascript"></script>
</div>
<?php } ?>
<?php /*------------------- widget's for the Single Page ------------------*/ ?>
...
You can also refer to Wordpress as more than a blog part 1 for more info on the usage of the conditional tag in the sidebar.
Links
3. The red links are just not my thing.
Well, if you like my current set up with the blue and what-not, feel free to use my style.css file for your own Pearl theme.
These are the 3 main things that I found could use some changing. It works for me, but it might not work for you. Everybody is different.
December 28th, 2006 at 11:16 am
[...] download the corrected index.php form here . 21 Comments Write a comment | comments rss [?] | trackback uri[?] [...]
December 28th, 2006 at 11:18 am
Thanks brother … Yeah now i get a feeling it’s my first theme :p . Thanks for the help.
June 18th, 2007 at 1:16 pm
Hello! Good Site! Thanks you! spmgghwopw