Balasan Forum telah dibuat

Melihat 2 balasan - 1 sampai 2 (dari total 2)
  • Forum: Komunitas Pengguna
    Dalam balasan untuk: Not working pagination issue
    Pencetus Utas jochristianto

    (@jochristianto)

    To editor/administrator. please remove/close this post. thanks.

    Forum: Komunitas Pengguna
    Dalam balasan untuk: Not working pagination issue
    Pencetus Utas jochristianto

    (@jochristianto)

    Update Bhs Indo

    Terdapat 2 tipe post, yakni ‘post’ dan ‘testimonies’, dimana masing2 artikel utk masing2 tipe bisa memiliki kategori dan tag. Utk kategori dan tag utk masing2 tipe sama. Misal utk ‘post’ memiliki tag ‘Relationships’, maka secara otomatis ‘testimonies’ juga memiliki tag ini. Jd tdk prlu dipermasalahkan.

    Kemudian saya buat 3 ‘post’ dengan tag ‘Relationships’.
    Lalu 1 ‘testimonies’ dengan tag ‘Relationships’.
    Total artikel pada tag ‘Relationships’ ada 4 artikel, yakni 3 ‘post’ dan 1 ‘testimonies’.

    Asumsikan bahwa post per page adalah 1, jd utk 1 halaman akan ditampilkan 1 artikel yang memiliki tag ‘Relationships’.

    Yg saya tanyakan adalah paging 1 – 3 benar, dan 4 salah, dimana halaman ke 4 diarahkan ke 404.php ada direktori theme yg sedang aktif. Mnurut analisa saya ini terjadi akibat URL rewriting yg salah, atau script yg saya buat tdk mampu mengubah URL rewriting drpd WordPress.

    Script : http://pastebin.com/zRZ1VgZc (sama dgn yg dibawah; isi dari tag.php)

    <?php // http://id.forums.wordpress.org/topic/not-working-pagination-issue?replies=1 ?>
    <?php get_header(); ?>
    <div id="left">
      <section id="primary">
        <div id="content" role="main">
          <?php the_post(); ?>
          <header class="page-header">
            <h1 class="page-title">
              <?php printf( __( 'Tag Archives: %s', 'toolbox' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
            </h1>
          </header>
        <?php
    		global $wp_query;
    		$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
    		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    		$args=array(
    		'taxonomy' => $term->taxonomy,
    		'term' => $term->slug,
    		'post_type' => array('testimonies','post'),
    		'paged'=> $paged,
    		'posts_per_page' => 1,
    		'caller_get_posts'=> 1
    		);
    		query_posts($args);
    
    		rewind_posts();
    		while (have_posts()) : the_post();
    			get_template_part( 'content', get_post_format() );
    		endwhile;
    	?>
        </div>
      </section>
      <?php kriesi_pagination(); ?>
    </div>
    <?php get_sidebar(); get_footer();
    ?>
Melihat 2 balasan - 1 sampai 2 (dari total 2)