• 15-09-2013, 17:26:17
    #1
    Merhaba arkadaşlar, wordpress tabanlı sitemde anasayfada yazılar gözükmüyor. Sadece konu başlıkları çıkıyor.

    <?php the_content(); ?>
    <?php get_the_content(); ?> tüm kodları denedim ancak bir türlü yazıların içeriğini anasayfada gösteremiyorum.

    index.php bu şekilde:

    <?php get_header(); ?><?php global  $optionsdb; ?>
    
    
    <section id="content">
    	<?php if (have_posts()) : while (have_posts()) : the_post();  //Get posts
    			$titlupost = get_the_title();
    			$posturl = get_permalink();
    	?>
    			<article class="item">
    				<div class="date"><?php echo get_the_date('d.M.Y'); ?></div>
    				<div class="title"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
    				<?php if((isset($optionsdb['cwp_b_featureimg']) && $optionsdb['cwp_b_featureimg'] == 'Show') || !isset($optionsdb['cwp_b_featureimg'])) { ?>
    					<div class="image">
    						<?php 
    							$feat_image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' );
    							if(isset($feat_image[0])):
    								echo '<a href='.$posturl.' title="'.$titlupost.'"><img src='.$feat_image[0].' alt="'.$titlupost.'"></a>';
    							endif;	
    						?>
    					</div>
    				<?php } ?>	
    				<div class="excerpt"><?php get_the_content('.. devamını oku »'); ?></div>
    				
    			</article><!--index article end-->	
    
    	<?php endwhile; 
    	/* Use PageNavi*/ else : ?>
    	<?php	_e('404 - Bulunamadı','cwp') ?>;
    	<?php endif; ?>
    
    
    <div class="buton_ileri"><?php next_posts_link('<img src="http://siteadresi.com/wp-content/themes/twentytwelve/images/ileri.png">') ?></div>
    
    <div class="buton_geri"><?php previous_posts_link('<img src="http://siteadresi.com/wp-content/themes/twentytwelve/images/geri.png">') ?></div>
    
    		</section><!--#content end-->
    
    
    <?php get_footer(); ?>
    Şimdiden teşekkürler.
  • 15-09-2013, 18:33:22
    #2
    http://codex.wordpress.org/Function_...et_the_content

    Linkte yazdığına göre get_the_content string değer döndürür. Print ile yazdırman lazım.
  • 15-09-2013, 18:37:32
    #3
    ahmetlutfu adlı üyeden alıntı: mesajı görüntüle
    http://codex.wordpress.org/Function_...et_the_content

    Linkte yazdığına göre get_the_content string değer döndürür. Print ile yazdırman lazım.
    Verdiğiniz linkteki bu kodu denedim ancak yine olmadı
    Alıntı
    <?php
    $content = get_the_content('Read more');
    print $content;
    ?>
    Başlık gözüküyor fakat yazı içeriği hiçbir şekilde gözükmüyor.
  • 16-09-2013, 00:43:26
    #4
    Konuyla ilgili bir fikri olan arkadaş yok mu?
  • 06-12-2013, 23:00:47
    #5
    Unforgiven adlı üyeden alıntı: mesajı görüntüle
    Konuyla ilgili bir fikri olan arkadaş yok mu?
    hocam özel mesaj kutunuz dolu , mesaj atamıyorum
  • 06-12-2013, 23:32:42
    #6
    Sizin index.php üzerinde denedim çalışıyor.
    Bunu
    <div class="excerpt"><?php get_the_content('.. devamını oku »'); ?></div>
    Bununla değiştirin.
    <div class="excerpt"><?php the_excerpt(); ?><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">devamını oku »</a></div>