Bonjour
j'utilise la version 4.0 de WP
J'ai une partie publique et une partie membre. Dans la partie publique, j'ai fait les règlages et mis une page pour qu'il affiche les derniers articles.
Je voudrais la même chose pour la partie membre, sauf que le excerpt et la pagination ne fonctionne pas
voici mon code
<?php
/*
* Template Name: fil d'actualité
*/
get_header(); ?>
<div id="main-content" class="main-content">
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
$query = new WP_query(array('post_type'=>'post', 'post_status'=>'private'));
while($query->have_posts()): $query->the_post(); global $post;
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>
<?php
endif;
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-meta">
<span class="cat-links"><?php echo "Vous êtes ici -> "; ?> <?php echo get_the_category_list( _x( ' -> ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
</div>
<div class="entry-meta">
<?php
if ( 'post' == get_post_type() )
twentyfourteen_posted_on();
if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) :
?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyfourteen' ),__ ( '1 Comment', 'twentyfourteen' ), __( '% Comments', 'twentyfourteen' ) ); ?></span>
<?php
endif;
edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' );
?>
</div><!-- .entry-meta -->
</header><!-- .entry-header -->
<div class="entry-content">
<?php
if ( is_category() || is_archive() ) {
the_excerpt();
} else {
the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyfourteen' ) );
wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>',
'link_before' => '<span>',
'link_after' => '</span>',
) );
}?>
</div><!-- .entry-content -->
</article>
<!-- #post-## -->
<?php endwhile; ?>
<nav class="navigation paging-navigation" role="navigation">
<div class="pagin loop-pagination">
<?php
twentyfourteen_paging_nav();
?>
</div>
</nav>
</div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php
get_sidebar();
get_footer();
Je ne comprends pas pourquoi ca ne marche pas
merci de votre aide