• 06-03-2014, 21:31:21
    #1
    Üyeliği durduruldu
    php de yeniyim ve wordpress sitesi kodluyorum biraz bilgim var ama syntaxları içinden çıkmadım lütfen yardım edin kodları aşağıda vieriyorum


    <?php 
    		
    		// KONTROL EDİP ÇEKME
    if (get_option('beta_sondk') == "true" ) { 
    
    echo '<?php query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid")."
    "); ?>
    		<?php while (have_posts()) : the_post(); ?>';
    
    echo '
    
    <div class="grid_12 first">
    
    
    
    
    			<div class="ssondakika">
    				<a class="all" title="'.<?php  the_title(); ?>.'" href="sondakika.html">
    					'.<?php  the_title(); ?>.'
    				</a>
    				<a class="sd_baslik" target="_blank" title="'.<?php  the_title(); ?>.'" href="'.<?php the_permalink(); ?>.'">
    					'.<?php  the_title(); ?>.'		</a>
    			</div>	
    		</div>';
    	<?php endwhile; ?>
    }
    
    else{
    
    echo "";
    
    }
    
    		
    		
    		
    		
    		?>
  • 06-03-2014, 21:39:53
    #2
    Hocam baya karıştırmışsınız işi, şöyle ki zaten echo ' yaparken içine <?php ?> tagları koymamalsınız yani

    "'.<?php the_title(); ?>.'"

    böyle değil

    "'.the_title();.'"

    olmalı
  • 06-03-2014, 21:41:46
    #3
    bekirbasar adlı üyeden alıntı: mesajı görüntüle
    php de yeniyim ve wordpress sitesi kodluyorum biraz bilgim var ama syntaxları içinden çıkmadım lütfen yardım edin kodları aşağıda vieriyorum


    <?php 
    		
    		// KONTROL EDİP ÇEKME
    if (get_option('beta_sondk') == "true" ) { 
    
    echo '<?php query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid")."
    "); ?>
    		<?php while (have_posts()) : the_post(); ?>';
    
    echo '
    
    <div class="grid_12 first">
    
    
    
    
    			<div class="ssondakika">
    				<a class="all" title="'.<?php  the_title(); ?>.'" href="sondakika.html">
    					'.<?php  the_title(); ?>.'
    				</a>
    				<a class="sd_baslik" target="_blank" title="'.<?php  the_title(); ?>.'" href="'.<?php the_permalink(); ?>.'">
    					'.<?php  the_title(); ?>.'		</a>
    			</div>	
    		</div>';
    	<?php endwhile; ?>
    }
    
    else{
    
    echo "";
    
    }
    
    		
    		
    		
    		
    		?>
    Şu şekilde deneyin ;
     <?php 
    		
    		// KONTROL EDİP ÇEKME
    if (get_option('beta_sondk') == "true" ) { 
    
    query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid")."
    ");
    while (have_posts()) : the_post();
    
    echo '<div class="grid_12 first">
    			<div class="ssondakika">
    				<a class="all" title="'.the_title().'" href="sondakika.html">
    					'.the_title().'
    				</a>
    				<a class="sd_baslik" target="_blank" title="'.the_title().'" href="'.the_permalink().'">
    					'.the_title().'</a>
    			</div>	
    		</div>';
    endwhile;
    }
    else{
    echo "";
    }
    ?>
  • 06-03-2014, 21:44:27
    #4
    PHP tagleri içinde php tagi kullanamazsınız. Kodlarınız doğru ise syntax aşağıdaki şekilde olmalıdır.

    <?php
    // KONTROL EDİP ÇEKME 
    if (get_option('beta_sondk') == "true" ) {  
    	query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid"));
    	while (have_posts()) {
    		the_post();
    		echo '
    		<div class="grid_12 first"> 
    			<div class="ssondakika"> 
    		    	<a class="all" title="'.the_title().'" href="sondakika.html">
    					'.the_title().' 
    				</a> 
    		        <a class="sd_baslik" target="_blank" title="'the_title()'" href="'the_permalink().'">
    		        	'.the_title().'
    		        </a> 
    			</div>     
    		</div>'; 
    	} 
    else { 
    	echo "";
    }
    ?>
  • 06-03-2014, 21:50:39
    #5
    Üyeliği durduruldu
    @saintx bu konularda iyidir hocam .
  • 06-03-2014, 22:01:05
    #6
    Üyeliği durduruldu
    destekleriniz için tşekkür ederim aşağıdaki gibi yaptığım zaman karşıma 6-7 kere aynı başlık çıkıyor ve istediğim yerin üstünde çıkıyor acaba query_post'u div grid_12'nin altına alırsak nasıl bir syntax uygulamalıyız.

    if (get_option('beta_sondk') == "true" ) {  
    
    query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid")." 
    "); 
    while (have_posts()) : the_post(); 
    
    echo '<div class="grid_12 first"> 
                <div class="ssondakika"> 
                    <a class="all" title="'.the_title().'" href="sondakika.html"> 
                        '.the_title().' 
                    </a> 
                    <a class="sd_baslik" target="_blank" title="'.the_title().'" href="'.the_permalink().'"> 
                        '.the_title().'</a> 
                </div>     
            </div>'; 
    endwhile;
    aldığım sonuc

  • 06-03-2014, 22:12:31
    #7
    <?php         // KONTROL EDİP ÇEKME
    if (get_option('beta_sondk') == "true" ) { 
      echo '<div class="grid_12 first">';
    query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid")."
    ");
    while (have_posts()) : the_post();
                echo '<div class="ssondakika">
                    <a class="all" title="'.the_title().'" href="sondakika.html">
                        '.the_title().'
                    </a>
                    <a class="sd_baslik" target="_blank" title="'.the_title().'" href="'.the_permalink().'">
                        '.the_title().'</a>
                </div>';    
           
    endwhile;
    echo '</div>';
    } else {
    echo "";
    }
    ?>
  • 06-03-2014, 22:42:28
    #8
    Üyeliği durduruldu
    sonuç aynı değişen bir şey yok
  • 06-03-2014, 23:53:58
    #9
    Kimlik doğrulama veya yönetimden onay bekliyor.
    @bekirbasar; şu şekilde deneyebilir misiniz?

    <?php
    	
    	if(get_option('beta_sondk') == "true")
    	{
    		query_posts("showposts=1&orderby=date&cat=".get_option("beta_sondkid"));
            
    		while(have_posts()): the_post();
    			
    			echo '<div class="grid_12 first">';
    			echo '<div class="ssondakika"><a class="all" title="'.get_the_title().'" href="'.get_the_permalink().'">'.get_the_title().'</a>';
    			echo '<a class="sd_baslik" target="_blank" title="'.get_the_title().'" href="'.get_the_permalink().'">'.get_the_title().'</a>';
    			echo '</div></div>';
    			
    		endwhile;
    	}
    	else
    	{
    		echo '';
    	}