Mullet code for WordPress
Hey, below is the blog mulletization code for WordPress powered weblogs. It’s damn easy. Have fun!
<?php
// to count posts inside WP loop
$postCount=0;
// number of full posts to display
$displayNumPosts = 5;
?>
<?php
// WP loop
if(have_posts()) : while (have_posts()) : the_post();
?>
<?php
if($postCount<$displayNumPosts) {
?>
<!-- TEMPLATE CODE TO SHOW FULL POST -->
<a href="<?php the_permalink() ?>">
<?php the_title(); ?>
</a>
<div class="content">
<?php the_content(); ?>
</div>
<?php } else { ?>
<!-- TEMPLATE CODE TO SHOW MULLETED POST -->
<?php the_time('M j, y') ?>
<a href="<?php the_permalink() ?>">
<?php the_title(); ?>
</a>
<?php } ?>
<?php
// increment $postCount
$postCount++;
?>
<?php
// WP loop ends
endwhile; endif;
?>
kapil :: Jan.22.2006 :: Uncategorized ::


Mullet Blog Layout: Now in WordPress
Kapil Mohan has implemented the Mullet blog layout in WordPress. And he’s also released the code for how to do it. This is something that people have been asking me for for months now, but that I’ve been too (busy?…
Thanks for sharing this! We’ll implement it very soon on our blog. Any chance that you’ll wrap this up and make available as a Wordpress plugin?
/Jesper
PS. Jonathan Boutelle wrote about your effort here:
http://justaddwater.dk/2006/01/09/mullet-style-blog-layout-and-complete-archive-page/#comment-101
[…] Kapil Mohan in the post “Mullet” (and here is his code for WordPress) […]
Hi Kapil,
I do want to use your code, but I had a question. I see no way as to where you are checking for a total number of posts? I mean how do you know in this loop when to stop?
Say I want a total of 5 + 30 posts in the mullet?
[…] I definitely see the benefit in the “mullet”, and hope to adapt it to my blog pretty soon. I will post an entry on why it makes sense to me, and how I did it (will definitely include an adapted version of mullet code by Kapil Mohan). […]
Hey Hemanshu,
Right now it is showing up all the posts. It uses a while loop to do so:
// WP loop
if(have_posts()) : while (have_posts()) : the_post();
[…] Mullet for wordpress mullet, plugin, wordpress I hacked together a small function which runs the mullet on my front page. This is different than Kapil Mohan’s implementation in that the number (or how far back) to make the mullet is an argument to the function, thus you can control how many links to put in your mullet. […]
Google is the best search engine.
[…] Thanks to Jonathan Boutelle for the original idea, Kapil Mohan for the mullet code, and Gopalarathnam for the long-tail archive code. […]
New mullet in town at topofthemountains.net…
Ben Crowder has implemented the mullet on his blog. Looks like he used Kapil Mohan’s wordpress mullet layout, and Gopal Arathanam’s long tail archive template. Makes me with I used wordpres for my blog! Nice job, the mullet looks great…….
hi,
thanks for sharing this code it’s very useful while working on some important concepts
hi,
thanku for giving the mullet code for wordpress.