• 13-12-2012, 11:47:18
    #1
    boxoffice temasını kullanıyorum sorunum şu

     <?php if  (have_posts()) : query_posts('orderby=rand'); ?>
    bu kod normal konuları rastgele gösteriyo fakat bu temada konu yerine "movie" adı altında farklı bi tasarım var konu olarak görmüyo yani bu movie zımbırtısını kodda değişiklikler yaptım fakat bi türlü beceremedim rastgele yapamayı

    ana indexs şablonum
    <?php get_header(); ?>
    <?php
    if(get_option('boxof_home') == "movies") { ?>	
    <?php include (TEMPLATEPATH . '/lib/movie-home.php'); ?>
    <?php } else { ?>
    
    <div id="content">
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    		
    <div class="post" id="post-<?php the_ID(); ?>">
    <div class="title">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    </div>
    <div class="postmeta">
    	<span class="author">Gönderen <?php the_author(); ?> </span> <span class="clock">  <?php the_time('M - j - Y'); ?></span> <span class="comm"><?php comments_popup_link('0 Comment', '1 Comment', '% Comments'); ?></span>
    </div>
    <div class="entry">
    
    <?php
    if ( has_post_thumbnail() ) { ?>
    	<img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=150&amp;w=200&amp;zc=1" alt="" />
    <?php } else { ?>
    	<img class="postimg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php bloginfo('template_directory'); ?>/images/dummy.jpg&amp;h=120&amp;w=200&amp;zc=1" alt="" />
    <?php } ?>
    
    <?php wpe_excerpt('wpe_excerptlength_index', ''); ?>
    
    <div class="clear"></div>
    </div>
    
    <div class="singleinfo">
    <span class="category">Kategoriler: <?php the_category(', '); ?> </span>
    </div>
    
    </div>
    <?php endwhile; ?>
    
    <?php getpagenavi(); ?>
    
    <?php else : ?>
    
    	<h1 class="title">Bulunamadı</h1>
    	<p>Üzgünüm ama burada olmayan bir şey arıyorsun.</p>
    
    
    <?php endif; ?>
    
    </div>
    <?php } ?>
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    buda movie-home.php
    <div id="content">
    
    <?php
    $temp = $wp_query;
    $wp_query= null;
    $wp_query = new WP_Query();
    $wp_query->query('post_type=movies'.'&paged='.$paged);
    ?>
    
    
    <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>	
    
    <div class="box " id="post-<?php the_ID(); ?>">
    
    <div class="boxim">
    <?php
    if ( has_post_thumbnail() ) { ?>
    	<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?>&amp;h=270&amp;w=180&amp;zc=1" alt=""/></a>
    <?php } else { ?>
    	<a href="<?php the_permalink() ?>"><img class="boximg" src="<?php bloginfo('template_directory'); ?>/images/dummy.png" alt="" /></a>
    <?php } ?>
    
    <div class="scorebox">
    <span class="sholder"> <span class="scorebar score-<?php $rscore=get_post_meta($post->ID, 'wtf_rscore', true); echo $rscore; ?>"> </span>    </span>
    </div>
    
    </div>
    
    <div class="boxentry">
    <div class="btitle">
    	<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    </div>
    <div class="bmeta">
    <span class="mgenre"><?php echo get_the_term_list( $post->ID, 'movie-genre', '', ', ', '' ); ?></span> <span class="mcom"><?php comments_popup_link('0', '1', '%'); ?></span>
    </div>
    <div class="clear"></div>
    </div>
    </div>
    
    <?php if(++$counter % 3 == 0) : ?>
    <div class="clear"></div>
    <?php endif; ?>
    <?php endwhile; ?>
    
    
    <div class="clear"></div>
    <?php getpagenavi(); ?>
    <?php $wp_query = null; $wp_query = $temp;?>
    </div>
    nasıl bi kodla bu sorunu aşabilirim ?
  • 13-12-2012, 20:39:12
    #2
    yokmu yardım edecek biri?
  • 23-09-2019, 23:10:43
    #3
    benzer konuyu ben de araştırıyorum, konu hortlayacak ama