• 10-12-2014, 08:24:11
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    İyi günler;
    Bir iki sene önce Buradaki konuda etiketleri A dan Z ye sıralama sorununu halletmiştik lakin wordpress güncellemeleri her neyi nasıl güncellediyse bu konudaki kodlar değişkenlik gösterdi.

    Örneğin:
    Eskiden A harfini tıkladığımda A harfi ile başlayan etiketler listeleniyordu.
    Şimdi A harfini tıkladığımda içinde A harfi olan etiketler listeleniyor.
    Bu sorunu ücretli/ücretsiz çözebilecek olan var mı?

    Kodun çalıştığı Sitem : Rüya Tabirleri
    Kodlar:
    <?php
    /*
    Template Name: Tag Index
    */
    
    get_header();
    
    $valid_characters = range( 'a' , 'z' );
    
    // -----> This fixes the previous issue <----- //
    $ent = ( strpos( get_permalink( $post->ID ) , '?' ) != false ) ? '&' : '?' ;
    
    $nav = array();
    // Build nav array
    foreach( $valid_characters as $key => $character ) {
    	$nav[] = '<a href="' . get_permalink( $post->ID ) . $ent.'tags=' . $character . '">' . strtoupper( $character ) . '</a>';
    }
    
    // Array to hold tags, needs to be set, so the empty check works when none of the switch cases hit a match (for whatever reason)
    $tags = array();
    // Array that will hold arrays of tags based on their first letter
    $tag_array = array();
    
    // Main switch
    switch( true ) {
    	// If request for tag with particular letter
    	case ( isset( $_GET['tags'] ) ):
    		// If it's in the arrays created earlier, get tafs and sort into array
    		case ( in_array( $_GET['tags'] , $valid_characters ) ):
    			$tags = get_terms( 'post_tag' , "hide_empty=0&name__like=$_GET[tags]" );
    
    			if( !empty( $tags ) ) {
    				foreach( $tags as $tag ) {
    					$tag_array[$tag->name{0}][] = '<li><a href="'.get_tag_link( $tag->term_id ).'">'.$tag->name.' gormek</a></li>';
    				}
    			}
    		break;
    	break;
    	case ( !isset( $_GET['tags'] ) ):
    	default:
    		$tags = get_terms( 'post_tag' , 'hide_empty=0' );
    
    		if( !empty( $tags ) ) {
    			foreach( $tags as $tag ) {
    				$tag_array[$tag->name{0}][] = '<li><a href="'.get_tag_link( $tag->term_id ).'">'.$tag->name.' gormek</li>';
    			}
    		}
    	break;
    }
    
    ?>
    
    
    
    
    
    
    
    
    <div class="maincontainer">
    <?php include (TEMPLATEPATH . '/alfabe-listesi.php'); ?>
    <div class="contentwrapper1">
    
    
    
    
    <div class="adanzyelist">
    				
    					
    					<!-- Feel free to add regular stuff you want here, like the_content() etc. -->
    
    					<?php
    					// If there's tags in the array
    					if( !empty( $tag_array ) ) {
    					foreach( $tag_array as $character => $character_tags ) {
    					?>
    					
    					<div class="medium_title2"> <?php echo $character; ?> " Harfi</div>
    					<ul><?php foreach( $character_tags as $key => $tag ) { echo $tag; } ?></ul>	
    					<div class="clear"></div>
    
    					<?php }	} else { ?>
    					<div class="clear"></div>
    					<h4>Bu Harfte Henüz Hiçbir Rüya Yorumlanmamıştır. Ruyanızı Bize İletebilir Ücretsiz Olarak Hemen Yorumlatabilirsiniz</h4>
    
    					<?php } ?>				  
    
    </div>
    <!-- contentwrapper -->
    
    
    <div class="footerwrapper">
    <?php get_footer(); ?>
  • 10-12-2014, 18:27:48
    #2
    Ücretli yardım edecek kimsede mi yok.

    SM-N910C cihazımdan gönderildi
  • 16-12-2014, 03:53:23
    #3
    Yardım talebi halen güncel ücretli yardım edecek kimse yok mu

    SM-N910C cihazımdan gönderildi