• 02-10-2014, 04:31:03
    #1
    Üyeliği durduruldu
    Merhaba arkadaşlar bi sorunum var.
    Şimdi ;
    Wordpress sayfamda katagoriler. normal olarak katagori ismi, katagori ismi olarak görünüyor.

    Benim yapmak istediğim ise bildiğimiz gibi forumdada bulunan

    bu şekilde numaralandırarak göstermek. ve mesela 1-50 arası varsa işte
    1.2.3.4.5 diyelim 25 tane gösteriyo olanda sonrasını şu şekilde göstermesi. (Last>>)
    yani şöyle bişey.


    Normalde kullandığım katagori gösterme kodum :
    <?php ob_start();?>
    <ul>
            <?php wp_list_categories('show_count=1&title_li='); ?>
    </ul>
    <p>
      <?php theme_wrapper($style, array('title' => __('Categories', THEME_NS), 'heading' => $heading, 'content' => ob_get_clean())); ?>
  • 02-10-2014, 07:19:27
    #2
    Üyeliği durduruldu
    <?php
        $args = array(
                'taxonomy' => 'categories',
                'orderby' => 'term_group',
                'hide_empty' => 0,
                'hierarchical' => 1,
                'exclude' => '16',
                'parent' => '0',
        );
        $categories = get_categories($args);
        $numOfItems = 60;
        $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;
        $to = $page * $numOfItems;
        $current = $to - $numOfItems;
        $total = sizeof($categories);
    
                echo '<ul class="content">';
    
        for ($i=$current; $i<$to; ++$i) {
    
            $category = $categories[$i];
    
            if ($category->name) { echo '<li><a href="' . get_term_link($category->slug, 'categories') . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></li>';}
    
        }
    
                echo '</ul>';
    
        unset($category);
        echo paginate_links( array(
            'base' => add_query_arg( 'cpage', '%#%' ),
            'format' => '',
            'prev_text' => __('&laquo;'),
            'next_text' => __('&raquo;'),
            'total' => ceil($total / $numOfItems),
            'current' => $page
        ));
    
        ?>
  • 02-10-2014, 07:43:42
    #3
    Üyeliği durduruldu
    tolgatasci adlı üyeden alıntı: mesajı görüntüle
    <?php
        $args = array(
                'taxonomy' => 'categories',
                'orderby' => 'term_group',
                'hide_empty' => 0,
                'hierarchical' => 1,
                'exclude' => '16',
                'parent' => '0',
        );
        $categories = get_categories($args);
        $numOfItems = 60;
        $page = isset( $_GET['cpage'] ) ? abs( (int) $_GET['cpage'] ) : 1;
        $to = $page * $numOfItems;
        $current = $to - $numOfItems;
        $total = sizeof($categories);
    
                echo '<ul class="content">';
    
        for ($i=$current; $i<$to; ++$i) {
    
            $category = $categories[$i];
    
            if ($category->name) { echo '<li><a href="' . get_term_link($category->slug, 'categories') . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a></li>';}
    
        }
    
                echo '</ul>';
    
        unset($category);
        echo paginate_links( array(
            'base' => add_query_arg( 'cpage', '%#%' ),
            'format' => '',
            'prev_text' => __('&laquo;'),
            'next_text' => __('&raquo;'),
            'total' => ceil($total / $numOfItems),
            'current' => $page
        ));
    
        ?>
    Hocam bu şekilde ekledim ama sayfada hiç bişey görünmüyor
    orjinal kullandığım sidebar.php katagori gösterme olayı en alt satırlarda.
    <?php
    if ( !theme_dynamic_sidebar( 'default' ) ) : ?>
    <?php $style = theme_get_option('theme_sidebars_style_default'); ?>
    <?php $heading = theme_get_option('theme_'.(is_single()?'single':'posts').'_widget_title_tag'); ?>
    <? if (theme_get_option('f_b_u_n_c')=="1") { if(theme_get_option('f_b_u_n')=="") { $fbun="WsSeoBlogu"; } else { $fbun=theme_get_option('f_b_u_n'); } ?>
    <? } ?>
    <?php ob_start();?>
    <p>
    <?php get_search_form(); ?>
    <?php theme_wrapper($style, array('title' => __('Search', THEME_NS), 'heading' => $heading, 'content' => ob_get_clean())); ?>
    </p>
      
      <?php endif; ?>
    
    </p>
    <div class="ws-content-layout">
      <div class="ws-content-layout-row">
        <div class="ws-layout-cell ws-layout-cell-size1">
          <div class="ws-box ws-block widget widget_text" id="text-3">
            <div class="ws-box-body ws-block-body">
              <div class="ws-bar ws-blockheader">
                <h3 class="t">Reklam alanı</h3>
              </div>
              <div class="ws-box ws-blockcontent">
                <div class="ws-box-body ws-blockcontent-body">
                  <div class="textwidget">
                    <center>
                      <div class="ad aligncenter"> <? echo theme_get_option('theme_ad_code_1') ?> </div>
                      <div class="cleared"></div>
                    </center>
                  </div>
                  <div class="cleared"></div>
                </div>
              </div>
              <div class="cleared"></div>
            </div>
          </div>
          <div class="cleared"> </div>
        </div>
      </div>
    </div>
    <?php ob_start();?>
    <ul>
            <?php wp_list_categories('show_count=1&title_li='); ?>
    </ul>
    <p>
      <?php theme_wrapper($style, array('title' => __('Categories', THEME_NS), 'heading' => $heading, 'content' => ob_get_clean())); ?>
  • 02-10-2014, 15:49:23
    #4
    Prosystem adlı üyeden alıntı: mesajı görüntüle
    Merhaba arkadaşlar bi sorunum var.
    Şimdi ;
    Wordpress sayfamda katagoriler. normal olarak katagori ismi, katagori ismi olarak görünüyor.

    Benim yapmak istediğim ise bildiğimiz gibi forumdada bulunan

    bu şekilde numaralandırarak göstermek. ve mesela 1-50 arası varsa işte
    1.2.3.4.5 diyelim 25 tane gösteriyo olanda sonrasını şu şekilde göstermesi. (Last>>)
    yani şöyle bişey.


    Normalde kullandığım katagori gösterme kodum :
    <?php ob_start();?>
    <ul>
            <?php wp_list_categories('show_count=1&title_li='); ?>
    </ul>
    <p>
      <?php theme_wrapper($style, array('title' => __('Categories', THEME_NS), 'heading' => $heading, 'content' => ob_get_clean())); ?>
    Wordpress pagenavi kullanin tavsiyem istediginiz sekilde admin'den ayarliyabiliyorsunuz.
  • 02-10-2014, 16:55:50
    #5
    Üyeliği durduruldu
    kingofseo adlı üyeden alıntı: mesajı görüntüle
    Wordpress pagenavi kullanin tavsiyem istediginiz sekilde admin'den ayarliyabiliyorsunuz.
    hocam PageNav sadece konuları yazıları sıralandırıyor. ben katagorileri bu şekilde sıralandırmak istiyorum.