Merhaba arkadaşlar. Wordpresste tema kodlarken bir kaç sıkıntı yaşadım. Arkadaşlar, wordpressde category.php sayfam kategoriye ait haberleri çekmiyor karışık çekiyor. Aşağıda category.php sayfamı paylaştım.
@saintx yardım edersen sevinirim.
<?php include('inc/header.php'); ?>
<?php include ('manset1.php');?>
<?php wp_reset_query();?>
<div class="kategoribaslik"><h1><?php wp_title(''); ?> Kategorisindeki Haberler Aşağıda Listelendi</h1></div>
<div class="p10"></div>
<div class="betaek_8 first">
<!-- Headline -->
<div id="headline">
<div class="news">
<?php query_posts("showposts=1orderby=date&cat=".the_category_id('')."");
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="selected">
<p><?php the_title(); ?></p>
<?php if ( has_post_thumbnail() ): $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); $image_url = $image_url[0]; else: $image_url = get_post_meta($post->ID, "resim", true); endif; ?>
<img width="628" height="304" alt="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo $image_url; ?>&w=628&h=304&zc=0" />
<strong><?php the_title(); ?></strong>
</a>
<?php endwhile; ?>
<?php query_posts("showposts=19&offset=1&orderby=date&cat=".the_category_id('')."");
while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="mainLink cuff">
<p><?php the_title(); ?></p>
<?php if ( has_post_thumbnail() ): $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); $image_url = $image_url[0]; else: $image_url = get_post_meta($post->ID, "resim", true); endif; ?>
<img width="628" height="304" alt="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo $image_url; ?>&w=628&h=304&zc=0" />
<strong><?php the_title(); ?></strong>
</a>
<?php endwhile; ?>
</div>
</div>
<div class="clear"></div>
<!-- /Headline 1-->
<div class="clear"></div>
<ul class="categories_news">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>">
<?php if ( has_post_thumbnail() ): $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); $image_url = $image_url[0]; else: $image_url = get_post_meta($post->ID, "resim", true); endif; ?>
<img width="143" height="100" alt="<?php the_title(); ?>" src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php echo $image_url; ?>&w=143&h=100&zc=0" />
<strong><?php the_title(); ?></strong>
<p><?php the_content_rss('', TRUE, '', 10); ?></p>
<span><?php the_time('j F Y - l') ?></span>
</a>
</li>
<?php endwhile; ?>
<?php endif; ?>
</ul>
<?php sayfalama(); ?>
</div>
<?php include ('sidebar.php');?>
<div class="clear"></div>
</div>
<?php include('footer.php');?>