Enjoy an ad free experience by logging in. Not a member yet?
Register .
01-15-2013, 03:26 PM
PM User |
#1
Regular Coder
Join Date: Oct 2009
Location: GERMANY
Posts: 134
Thanks: 29
Thanked 1 Time in 1 Post
help me fix this
Hey guys,
I want my category /archive page to look exactly like my index page, but how can I achieve that?
this is my index:
http://www.shoptothetop.de
this is the archive:
http://www.shoptothetop.de/category/...thetop-inside/
these are the files. Index.php
PHP Code:
<?php get_header (); ?>
<?php
$options = get_option ( 'blocks_options' );
if ( function_exists ( 'wp_list_comments' )) {
add_filter ( 'get_comments_number' , 'comment_count' , 0 );
}
?>
<?php if ( $options [ 'notice' ]) : ?>
<div class="block">
<div class="
<?php if( $options [ 'notice_color' ] == 1 ) {echo 'content' ;}
else if( $options [ 'notice_color' ] == 3 ){echo 'content r' ;}
else{echo 'content g' ;}
?> ">
<div id="notice_content"><?php echo( $options [ 'notice_content' ]); ?> </div>
</div>
</div>
<?php endif; ?>
<?php if ( have_posts ()) : while ( have_posts ()) : the_post (); ?>
<div class="post">
<div class="meta2">
<div class="act">
<?php
if ( function_exists ( 'the_views' )) the_views ( true , '' , ' | ' );
comments_popup_link ( __ ( 'Keine Kommentare' , 'blocks' ), __ ( '1 Kommentar' , 'blocks' ), __ ( '% Kommentare' , 'blocks' ));
edit_post_link ( __ ( 'Edit' , 'blocks' ), ' | ' , '' );
?>
</div>
<div class="info">
<?php
the_time ( __ ( 'j. M, Y' , 'blocks' ));
if ( $options [ 'categories' ]) {
printf ( __ ( ' | Kategorie %1$s' , 'blocks' ), get_the_category_list ( ', ' ));
}
?>
</div>
<div class="fixed"></div>
</div>
<h3 class="title"><a href="<?php the_permalink () ?> " rel="bookmark"><?php the_title (); ?> </a></h3>
<div class="content">
<?php the_content ( __ ( 'Weiterlesen...' , 'blocks' )); ?>
<div class="fixed"></div>
</div>
<div class="meta">
<div class="tfss">
<?php if( function_exists ( 'kc_add_social_share' )) kc_add_social_share (); ?>
</div>
<div class="tfssautor">
<?php if ( $options [ 'author' ] && function_exists ( 'get_avatar' ) && get_option ( 'show_avatars' )) : ?>
<div class="author"><?php the_author_posts_link_with_avatar (); ?> </div>
<?php endif; ?>
</div>
</div>
</div>
<?php endwhile; ?>
<div id="pagenavi" class="block">
<?php if( function_exists ( 'wp_pagenavi' )) : ?>
<?php wp_pagenavi () ?>
<?php else : ?>
<div class="content g">
<span class="newer"><?php previous_posts_link ( __ ( '« Newer Entries' , 'blocks' )); ?> </span>
<span class="older"><?php next_posts_link ( __ ( 'Older Entries »' , 'blocks' )); ?> </span>
<div class="fixed"></div>
</div>
<?php endif; ?>
</div>
<?php else: ?>
<div class="block">
<div class="content small r">
<?php _e ( 'Sorry, no posts matched your criteria.' , 'blocks' ); ?>
</div>
</div>
<?php endif; ?>
<?php get_footer (); ?>
and this is the archive.php
PHP Code:
<?php get_header (); ?>
<?php
if ( function_exists ( 'wp_list_comments' )) {
add_filter ( 'get_comments_number' , 'comment_count' , 0 );
}
?>
<div class="post">
<h3 class="title">
<?php
if ( is_search ()) {
_e ( 'Search Results' , 'blocks' );
} else {
_e ( 'Archives' , 'blocks' );
}
?>
</h3>
<div class="content">
<ul id="archive">
<?php if ( have_posts ()) : ?>
<?php while ( have_posts ()) : the_post (); ?>
<li class="archive-post">
<h3><a href="<?php the_permalink () ?> " rel="bookmark"><?php the_title (); ?> </a></h3>
<div class="excerpt">
<?php the_excerpt (); ?>
</div>
<div class="small">
<?php
if ( function_exists ( 'the_views' )) the_views ( true , '' , ' | ' );
comments_popup_link ( __ ( 'No comments' , 'blocks' ), __ ( '1 comment' , 'blocks' ), __ ( '% comments' , 'blocks' ));
edit_post_link ( __ ( 'Edit' , 'blocks' ), ' | ' , '' );
?>
</div>
<div class="small">
<?php
the_time ( __ ( 'M jS, Y' , 'blocks' ));
printf ( __ ( ' | Filed under %1$s' , 'blocks' ), get_the_category_list ( ', ' ));
?>
</div>
<div class="small"><?php the_tags ( __ ( 'Tags: ' , 'blocks' ), ', ' , '' ); ?> </div>
</li>
<?php endwhile; ?>
<?php else: ?>
<li class="archive-post">
<div class="small">
<?php _e ( 'Sorry, no posts matched your criteria.' , 'blocks' ); ?>
</div>
</li>
<?php endif; ?>
</ul>
</div>
<div class="meta">
<div class="act">
<?php edit_post_link ( _ ( 'Edit' ), '' , '' ); ?>
</div>
<div class="info">
<?php
// If this is a search
if ( is_search ()) {
printf ( __ ( 'Keyword: ‘%1$s’' , 'blocks' ), wp_specialchars ( $s , 1 ) );
// If this is a category archive
} elseif ( is_category ()) {
printf ( __ ( 'Archive for the ‘%1$s’ Category' , 'blocks' ), single_cat_title ( '' , false ) );
// If this is a tag archive
} elseif ( is_tag () ) {
printf ( __ ( 'Posts Tagged ‘%1$s’' , 'blocks' ), single_tag_title ( '' , false ) );
// If this is a daily archive
} elseif ( is_day ()) {
printf ( __ ( 'Archive for %1$s' , 'blocks' ), get_the_time ( __ ( 'F jS, Y' , 'blocks' )) );
// If this is a monthly archive
} elseif ( is_month ()) {
printf ( __ ( 'Archive for %1$s' , 'blocks' ), get_the_time ( __ ( 'F, Y' , 'blocks' )) );
// If this is a yearly archive
} elseif ( is_year ()) {
printf ( __ ( 'Archive for %1$s' , 'blocks' ), get_the_time ( __ ( 'Y' , 'blocks' )) );
// If this is an author archive
} elseif ( is_author ()) {
printf ( __ ( 'Archive by %1$s' , 'blocks' ), get_the_author () );
// If this is a paged archive
} elseif (isset( $_GET [ 'paged' ]) && !empty( $_GET [ 'paged' ])) {
_e ( 'Blog Archives' , 'blocks' );
}
?>
</div>
<div class="fixed"></div>
</div>
</div>
<div id="pagenavi" class="block">
<?php if( function_exists ( 'wp_pagenavi' )) : ?>
<?php wp_pagenavi () ?>
<?php else : ?>
<div class="content g">
<span class="newer"><?php previous_posts_link ( __ ( '« Newer Entries' , 'blocks' )); ?> </span>
<span class="older"><?php next_posts_link ( __ ( 'Older Entries »' , 'blocks' )); ?> </span>
<div class="fixed"></div>
</div>
<?php endif; ?>
</div>
<?php get_footer (); ?>
01-15-2013, 05:29 PM
PM User |
#2
Regular Coder
Join Date: Oct 2009
Location: GERMANY
Posts: 134
Thanks: 29
Thanked 1 Time in 1 Post
fixed it, just copied index.php and named it archive.php haha
Jump To Top of Thread
Thread Tools
Rate This Thread
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
All times are GMT +1. The time now is 05:27 AM .
Advertisement
Log in to turn off these ads.