Wordpress Kategori Hk.

Aegiis

Üye
8 Eyl 2016
66
0
Selamın Aleyküm Wordpress'ten tema kodluyorum fakat buraya adam pagination atmış. 5 olarak listelemiş onu değiştirmek istiyorum mesala sayfada 5 yerine 6 tane veri olsun istiyorum. Dosyanın ismi : category.php

Resim:
http://prnt.sc/njpddj
 
Moderatör tarafında düzenlendi:

Aegiis

Üye
8 Eyl 2016
66
0
category.php
Kod:
<?php get_header(); ?>
<div id="main_news_wrapper">
  <div id="row">
    <!-- Left wrapper Start -->
    <div id="left_wrapper">
      <div class="header">
           <h2>
              <?php echo orizon_breadcrumbs(); ?>
            </h2>
      </div>
      <ul style="background: #3f4146; margin-bottom: 10px; padding: 3px;" id="general_news">
      <?php $cur_cat_id = get_cat_id( single_cat_title("",false) );
    global $paged;
      while ( have_posts() ) : the_post(); ?>
        <li class="category">
        <div class="category-content">
        <div class="category-header">
          <a href="<?php the_permalink(); ?>">
            <?php if ( has_post_thumbnail() ) {  the_post_thumbnail(); }else{?>
			<img style=" width: 100%; height: 100%;" src="<?php echo get_template_directory_uri(); ?>/images/nophoto.jpg">
				<?php } ?>
          <font class="category-time"> <?php the_time('j F  Y') ?> </font>
            </a></div>
          <?php if (of_get_option('socail_sharing')=="1") { ?>
          <?php } ?>
          <div class="info">
            <a class="category-info-name" href="<?php the_permalink(); ?>">
             <?php if(strlen(get_the_title()) > 20){
			echo mb_substr(get_the_title(), 0,20);echo '...';
			}else{
			echo mb_substr(get_the_title(), 0,20);
			}  ?>
              </a>
       <a style="color: #f5f5f5;" href="<?php the_permalink(); ?>">
       <div class="download">
      <i class="fa fa-angle-right"></i> Read More
      </div>
       </a>
          </div>
          <div class="clear"> </div>
        </li>
      <?php endwhile;  ?>
      </ul>
      
      <?php wp_reset_query(); ?>
      <ul id="pager">
        <li>
             <?php  $postsperpage = get_option('posts_per_page');
                    $additional_loop = new WP_Query("cat='$cur_cat_id'&paged='.$paged.'&posts_per_page=$postsperpage");
            echo kriesi_pagination($additional_loop->max_num_pages);
            ?>
        </li>
    </ul>
      </div>
<!-- Left wrapper end -->
<?php get_sidebar(); ?>
<div class="clear">
</div>
</div>
</div>
<?php get_footer(); ?>
Kaynak kodları atabilirsen daha ayrıntılı bakabiliriz.
 

LETRX

Katılımcı Üye
21 Ocak 2010
355
4
Tromsø
category.php
Kod:
<?php get_header(); ?>
<div id="main_news_wrapper">
  <div id="row">
    <!-- Left wrapper Start -->
    <div id="left_wrapper">
      <div class="header">
           <h2>
              <?php echo orizon_breadcrumbs(); ?>
            </h2>
      </div>
      <ul style="background: #3f4146; margin-bottom: 10px; padding: 3px;" id="general_news">
      <?php $cur_cat_id = get_cat_id( single_cat_title("",false) );
    global $paged;
      while ( have_posts() ) : the_post(); ?>
        <li class="category">
        <div class="category-content">
        <div class="category-header">
          <a href="<?php the_permalink(); ?>">
            <?php if ( has_post_thumbnail() ) {  the_post_thumbnail(); }else{?>
			<img style=" width: 100%; height: 100%;" src="<?php echo get_template_directory_uri(); ?>/images/nophoto.jpg">
				<?php } ?>
          <font class="category-time"> <?php the_time('j F  Y') ?> </font>
            </a></div>
          <?php if (of_get_option('socail_sharing')=="1") { ?>
          <?php } ?>
          <div class="info">
            <a class="category-info-name" href="<?php the_permalink(); ?>">
             <?php if(strlen(get_the_title()) > 20){
			echo mb_substr(get_the_title(), 0,20);echo '...';
			}else{
			echo mb_substr(get_the_title(), 0,20);
			}  ?>
              </a>
       <a style="color: #f5f5f5;" href="<?php the_permalink(); ?>">
       <div class="download">
      <i class="fa fa-angle-right"></i> Read More
      </div>
       </a>
          </div>
          <div class="clear"> </div>
        </li>
      <?php endwhile;  ?>
      </ul>
      
      <?php wp_reset_query(); ?>
      <ul id="pager">
        <li>
             <?php  $postsperpage = get_option('posts_per_page');
                    $additional_loop = new WP_Query("cat='$cur_cat_id'&paged='.$paged.'&posts_per_page=$postsperpage");
            echo kriesi_pagination($additional_loop->max_num_pages);
            ?>
        </li>
    </ul>
      </div>
<!-- Left wrapper end -->
<?php get_sidebar(); ?>
<div class="clear">
</div>
</div>
</div>
<?php get_footer(); ?>

Php'cisin Sedat Hadı Bakalım :D 'Rookie
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.