arkadşlar sorun sanrım single.php de.
bi baksanız
Kod:
<?php get_header(); ?>
<div id="content_wrap">
<div id="content">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="page_post">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<div id="reklam">
<div id="reklamsol">
<script type="text/javascript"><!--
google_ad_client = "pub-2185173845859082";
/* 200x200, olusturulma 20.06.2009 */
google_ad_slot = "0991579826";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div id="reklamsag">
<script type="text/javascript"><!--
google_ad_client = "pub-2185173845859082";
/* 200x200, olusturulma 21.06.2009 */
google_ad_slot = "5857886268";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>
<div id="content_icerik">
<?php the_content(); ?>
</div>
</div>
<div class="post_details">
<?php
//for use in the loop, list 5 post titles related to first tag on current post
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo '<h3>Bunu okudun mu? Bunlara da bak bi :)</h3><br />';
$first_tag = $tags[0]->term_id;
$args=array(
'tag__in' => array($first_tag),
'post__not_in' => array($post->ID),
'showposts'=>5,
'caller_get_posts'=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">- <?php the_title(); ?></a><br /> <?php
endwhile;
}
else {
echo "Alakalı birşey yok ama sen benim son yazıma bak ?<br />";
$myposts = get_posts('numberposts=1&offset=0&category=0');
foreach($myposts as $post) :
?>
<a href="<?php the_permalink(); ?>">- <?php the_title(); ?></a><br />
<?php endforeach;
}
}
?>
<br />
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink() ?>&t=<?php the_title() ?>" title="Facebook'a ekle"><img src="/buton/facebook.gif" /></a>
<a href="http://www.addtoany.com/add_to/twitter?linkurl=<?php the_permalink() ?>&linkname=<?php the_title() ?>" title="Tweet'le" ><img src="/buton/twitter.png" /></a>
<a href="http://digg.com/submit?url=<?php the_permalink() ?>&title=<?php the_title() ?>&bodytext=<?php the_title() ?>" title="Digg'le"><img src="/buton/digg.gif" /></a>
<a href="http://del.icio.us/post?v=4&&noui&jump=close&url=<?php the_permalink() ?>&title=<?php the_title() ?>" title="Del icio us'a Ekle"><img src="/buton/del.jpg" /></a>
<a href="http://friendfeed.com/?url=<?php the_permalink() ?>&title=<?php the_title() ?>" target="_blank"><img src="/buton/ff.jpg" /></a>
</div>
<div class="post_details">
<p><?php the_time("j F 20y"); ?> tarihinde <?php the_author_posts_link(); ?> tarafından gönderilen yazıda <a href="<?php comments_link(); ?>"><?php comments_number('Yorum yok','1 Yorum var','% Yorum var'); ?></a>
<br />
Kategori: <?php the_category(', ') ?>
<br />
<?php the_tags( 'Etiketler: ', ', ', ''); ?></p>
</div>
<?php comments_template(); ?> <?php endwhile; else: ?>
<p>Uppss! sizin kriterlerinize uygun yazı bulamadım :S</p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Bookmarks