-
Posted in : Editor
-
Hello,
Thx for this template ;)I have a problem with the pagination.
I wish to draw the items in a category (voiture) but even if I have more of 10 articles, there is not “older” button (pagination). Do you know where can be the problem ?
(Sorry i’m not english :s)Thx a lot ;)
This is the code to the page in question :
<?php
/*
Template Name: Voiture
*/get_header();
?><div id=”main” class=”site-main”>
<div id=”primary” class=”content-area”>
<div id=”content” class=”site-content” role=”main”>
<div class=”layout-fixed”>
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
?>
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<?php
$hide_post_title = get_option( $post->ID . ‘hide_post_title’, false );
if ( $hide_post_title )
{
$hide_post_title = ‘style=”display: none;”‘;
}
else
{
$hide_post_title = “”;
}
?>
<header class=”entry-header cat” <?php echo $hide_post_title; ?>>
<h1 class=”entry-title-cat”><?php the_title(); ?></h1>
</header>
<div class=”blog-simple”>
<?php
the_content();
?>
<div class=”blog-simple”>
-
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
<header class=”entry-header”>
<h1 class=”entry-title”>
“><?php the_title(); ?>
</h1><div class=”entry-meta”>
<span class=”entry-date”>
<time class=”entry-date” datetime=”2012-02-13T04:34:10+00:00″><?php echo get_the_date(); ?></time>
</span><?php
if ( get_the_category() )
{
?>
<span class=”cat-links”>
<?php
the_category( ‘, ‘ );
?>
</span>
<?php
}
?>
</div>
</header><p>
<?php
pixelwars_theme_excerpt_max_charlength( 55 );
?>
</p>
</article>
<?php
$args_loop = array( ‘category_name’ => ‘voiture’, ‘post_type’ => ‘post’, ‘posts_per_page’ => 10 );
$loop_custom = new WP_Query( $args_loop );
if ( $loop_custom->have_posts() ) :
while ( $loop_custom->have_posts() ) : $loop_custom->the_post();
?>
<?php
endwhile;
endif;
wp_reset_query();
?>
</div>
</div>
</article>
<?php
endwhile;
endif;
wp_reset_query();
?>
</div>
<?php
get_template_part( ‘part’, ‘pagination’ );
?></div>
</div>
</div>
<?php
get_footer();
?>
-
<article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
You must be logged in and have valid license to reply to this topic.