public
Created

Add to new category layout for the raindrops theme.

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.