Suport » Șabloane și ajutor la personalizare » Paginatie cu wp pagenavi pentru page

  • Am o problema legata de paginatia intr-o pagina (page). Pe o pagina vreau sa afisez toate subpaginile care fac parte din aceasta pagina (child of). Insa eu am 50 de subpagini si as vrea sa zicem sa afisez 25 si dupa sa fie page 2 si urmatoarele 25.
    Folosesc o pagina template care are codul de mai jos si nu stiu cum as putea sa implementez wp_pagenavi pentru a face ce doresc eu.
    Poate cineva sa ma ajute?

    <?php 
    
    /**
     * Template Name: pagina categorie
     */
    
     ?>
    <?php get_header(); ?>
    	<div class="content">
    		<?php tie_breadcrumbs() ?>
    
    		<?php if ( ! have_posts() ) : ?>
    			<div id="post-0" class="post not-found post-listing">
    				<h1 class="post-title"><?php _e( 'Not Found', 'tie' ); ?></h1>
    				<div class="entry">
    					<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'tie' ); ?></p>
    					<?php get_search_form(); ?>
    				</div>
    			</div>
    		<?php endif; ?>
    
    		<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    		<?php $get_meta = get_post_custom($post->ID);  ?>
    		<?php //Above Post Banner
    		if( empty( $get_meta["tie_hide_above"][0] ) ){
    			if( !empty( $get_meta["tie_banner_above"][0] ) ) echo '<div class="ads-post">' .htmlspecialchars_decode($get_meta["tie_banner_above"][0]) .'</div>';
    			else tie_banner('banner_above' , '<div class="ads-post">' , '</div>' );
    		}
    		?>
    
    		<article class="post-listing post">
    			<?php tie_include( 'post-head' ); // Get Post Head template ?>
    			<div class="post-inner">
    				<h1 class="post-title"><?php the_title(); ?></h1>
    				<p class="post-meta"></p>
    				<div class="clear"></div>
    				<div class="entry">
    					<?php the_content(); ?>
    
    <!--Incepe cod pentru afiliere-->
    <center>
    <ul class="product_list">
    <?php
    	$pages = get_pages('child_of='.$post->ID.'&sort_column=post_title');
    	$count = 0;
    	foreach($pages as $page)
    	{?>
    
    <li>
            <div class="product_layout">
      <div class="thumb1"><a href="<?php echo get_page_link($page->ID) ?>"><?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?></a>
      <a href="<?php echo get_page_link($page->ID) ?>" title="<?php echo $page->post_title ?>"><?php $thetitle=$page->post_title; $getlength = strlen($thetitle);
    $thelength = 18;
    echo substr($thetitle, 0, $thelength);
    if ($getlength > $thelength) echo "..."; ?></a></div>
        <div class="bottom"></div> 
    
    </li>
    
    	<?php }
    
    ?>
     </ul></center>
     <div id="clear"></div>
    
    <!--Se termina cod afiliere-->
    		<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'tie' ), 'after' => '</div>' ) ); ?>
    
    					<?php edit_post_link( __( 'Edit', 'tie' ), '<span class="edit-link">', '</span>' ); ?>
    				</div><!-- .entry /-->	
    
    			</div><!-- .post-inner -->
    		</article><!-- .post-listing -->
    		<?php endwhile; ?>
    
    		<?php //Below Post Banner
    		if( empty( $get_meta["tie_hide_below"][0] ) ){
    			if( !empty( $get_meta["tie_banner_below"][0] ) ) echo '<div class="ads-post">' .htmlspecialchars_decode($get_meta["tie_banner_below"][0]) .'</div>';
    			else tie_banner('banner_below' , '<div class="ads-post">' , '</div>' );
    		}
    		?>
    
    		<?php comments_template( '', true ); ?>
    	</div><!-- .content -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  • Subiectul „Paginatie cu wp pagenavi pentru page” este închis pentru răspunsuri noi.