![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
||||
|
||||
|
Archive Page
Open archive.php and replace this: Code:
<?php get_header(); ?> Code:
<?php
get_header();
function sp_read_more_from($position) {
?>
<strong><a href="<?php echo get_category_link(get_theme_mod($position)); ?>" rel="bookmark"><?php _e("Read More Posts From", 'studiopress'); echo " ". cat_id_to_name(get_theme_mod($position)); ?> »</a></strong>
<?php
}
function sp_post_thumb($post, $position) {
if( get_post_meta($post->ID, "thumb", true) ):
?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=<?php echo get_theme_mod($position.'_thumb_height'); ?>&w=<?php echo get_theme_mod($position.'_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" />
</a>
<?php
else:
// You might want to show a default image?
endif;
}
?>
Code:
<?php sp_post_thumb($post, 'featured_main'); ?> Code:
<?php the_excerpt(); ?> Blog Page Open page_blog.php and replace this: Code:
<?php get_header(); ?> Code:
<?php
get_header();
function sp_read_more_from($position) {
?>
<strong><a href="<?php echo get_category_link(get_theme_mod($position)); ?>" rel="bookmark"><?php _e("Read More Posts From", 'studiopress'); echo " ". cat_id_to_name(get_theme_mod($position)); ?> »</a></strong>
<?php
}
function sp_post_thumb($post, $position) {
if( get_post_meta($post->ID, "thumb", true) ):
?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img class="thumb" src="<?php bloginfo('template_directory'); ?>/tools/timthumb.php?src=<?php echo get_post_meta($post->ID, "thumb", $single = true); ?>&h=<?php echo get_theme_mod($position.'_thumb_height'); ?>&w=<?php echo get_theme_mod($position.'_thumb_width'); ?>&zc=1" alt="<?php the_title(); ?>" />
</a>
<?php
else:
// You might want to show a default image?
endif;
}
?>
Code:
<?php sp_post_thumb($post, 'featured_main'); ?> Code:
<?php the_excerpt(); ?>
__________________
StudioPress | Follow StudioPress on Twitter | Fan Us on Facebook | Read the StudioPress Blog Last edited by CharlesClarkson; 01-09-2010 at 09:16 AM. Reason: the_excerpt() doesn't take arguments. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem with "How to Add Thumbnails to Your Blog Page and Category Archive Pages" | RSchulte | General Discussion | 2 | 01-23-2010 09:36 AM |
| Pb with tutorial "Add Thumbnails to Your Blog Page and Category Archive Pages" | shuyvenaar | General Discussion | 2 | 01-09-2010 11:55 AM |
| How to Add Thumbnails to the Blog Page and Category Archive Pages | tutorials | General Discussion | 1 | 01-05-2010 12:45 PM |
| How to Add Thumbnails to Your Blog Page and Category Archive Pages | tutorials | General Discussion | 1 | 01-05-2010 12:02 PM |
| How to Add Thumbnails to Your Blog Page and Category Archive Pages | tutorials | General Discussion | 1 | 01-05-2010 12:01 PM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us