Skip to content

@tenman /gist:4712070
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Add to new category layout for the raindrops theme.
Step 1: Create template file for category
filename:part-category.php
source:
<?php
/**
* Template part category
*
*/
?>
<<?php raindrops_doctype_elements('div','article');?> id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="yui-gf">
<div class="yui-u first">
<?php $thumbnail .= '<span class="category-thumb">';
$thumbnail .= get_the_post_thumbnail($post->ID, 'post-thumbnail',array("style"=>"vertical-align:text-bottom;"));
$thumbnail .= '</span>';
echo $thumbnail;?>
</div>
<div class="yui-u">
<?php
raindrops_entry_title(); ?>
<div class="entry-meta-default">
<?php raindrops_posted_on(); ?>
</div>
</div>
</div>
<?php if(is_single()){ raindrops_prev_next_post('nav-below');}?>
<?php comments_template( '', true ); ?>
</<?php raindrops_doctype_elements('div','article');?>>
Step2: Chenge the code loop.php line 40
/**
* In category blog
*
*
*
*
*/
}elseif(in_category( "blog" ) or has_post_format( "status" ) ){
get_template_part('part','blog');
above code change below
/**
* In category blog
*
*
*
*
*/
}elseif(in_category( "blog" ) or has_post_format( "status" ) ){
get_template_part('part','blog');
}elseif( is_category() ){
get_template_part('part','category' );
Step3: Add the style rules style.css
Add to style.css last line.
.index.category-archives .h2-thumb{
display:none;
}
Finish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.