hocam bu kodu benim verdiğim kod sayfasında nereye yapıştırmam lazım? veya siz kodun üstüne eklemişsiniz bende o şekilde mi eklemeliyim?
<?php
$categories = get_the_category($post->ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$args=array(
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) {
echo '<h3>Alternatifler</h3>';
while ($my_query->have_posts()) {
$my_query->the_post();
?>
<div class="latest_listings">
<div class="price">
</div>
<div><a href="<?php the_permalink() ?>" class="left_posts_link" rel="bookmark"><?php
for($i = 1; $i <= 1; $i++){
$image = get_post_meta($post->ID, "red_image".$i, true);
$blogurl = get_bloginfo('template_url');
if($image){
$output = '<img src="'.$blogurl.'/thumbnail.php?src='.$image.'&h=80&w=150&zc=0" alt="Featured Home" />';
echo $output;
}
}
?>
</a>
</div>
<div class="grid-left">
<a class="view" title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php bloginfo('template_url') ?>/images/view.png" /></a>
<p style="margin:0px 5px 5px 0px;"><?php echo $bed ;?> <?php echo ' ' ;?>
<?php echo $bath ;?><?php echo ' ' ;?><br>
</div>
</div>
<?php
}
}
wp_reset_query();
}
?>
<?php endwhile; ?>tam göremediğim için ancak bu kadar yardımcı olabiliyorum hocam. bu şekilde dener misin?
Dosyanın yedeğini mutlaka alın.