|
|
hocalar bi wordpress tema da ana sayfada 3 resimden oluşan bir bölüm var alt alta, ben buna kategori atamak istiyorum, çünkü şuan oraya eklenecek konular kontrolumde degil, bu kodlardan nereye kategori ID eklemem gerekir?
<!--START CODE for PART 1a )-->
<div class="thepart1a">
<div id="thepart1">
<div id="top-news-month">
<h5> Top News</h5>
</div>
<?php
query_posts(array(
'showposts'=> '3',
'orderby' => 'comment_count',
'offset'=>'0'
));
//query_posts('showposts=3&cat='.get_option('lhbox').'&offset=0');
if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="slider2" class="spotlightwrapperbig"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
<?php if(get_option('thumbok')!="yes"):?>
<img class="teaser-image-small" src="<?php bloginfo('template_directory'); ?>/includes/timthumb.php?src=<?php echo get_post_meta($post->ID, 'image',true) ?>&w=320&h=128&zc=1" />
<?php endif?>
<?php if(get_option('thumbok')!="no"):?>
<span class="teaser-image-small">
<?php the_post_thumbnail( 'hotleft' ); ?>
</span>
<?php endif?>
</a>
<div class="spotlightIT">
<h2 class="articletitle"> <a href="<?php the_permalink() ?>" rel="bookmark">
<?php the_title2('', '...', true, '54'); ?>
</a> </h2>
</div>
</div>
<?php endwhile; else: ?>
<p>
<?php _e('Sorry, no posts matched your criteria.'); ?>
</p>
<?php endif; ?>
</div>
</div>
<!--END CODE for PART 1a )-->
şeyini şeyettiğimin şeyi
|
|
|
<?php
$category = get_the_category();
echo $category[0]->cat_name;
?>
Herşey kolaydır
|
|
|
whoobay bunu yazdı: -----------------------------
-----------------------------
eywallah hocam ama eskisi gibi oldu yine.. kategori ID sini yada adını nereye yazıyorum?
daha detaylı anlatayım bu index php den bir bölüm.. bu bölümde yayınlananlar istedigim kategoriden seçilebilsin istiyorum ama bu haliyle kafadan son eklenenleri seçiyor kendisi..
şeyini şeyettiğimin şeyi
|
|