Archives Display Full Posts with Formatting
-
Apologies if this has already been addressed. I’ve searched extensively but haven’t found a solution.
I want to display all posts of a particular category on one page. I want them to display fully and with all the formatting I’ve done in the original posts. What displays now is truncated posts with none of the formatting.
From what I’ve read, some themes have a ‘the_excerpt’ that can be replaced with ‘the_content’. My theme (dt nimble) doesn’t use ‘the_excerpt’ and I’m not sure what it uses instead.
I feel like it should be a simple fix in archive.php:
<?php dt_storage('have_sidebar', true); ?> <?php get_header(); ?> <?php get_template_part('top-bg'); ?> <div id="wrapper"> <?php get_template_part('nav'); ?> <div id="container"> <h2><?php if( is_category() || is_tax() ): echo single_cat_title( null, false ); elseif( is_tag() ): _e( 'Tag archive: ', LANGUAGE_ZONE ); echo single_tag_title( null, false ); elseif( is_author() ): $curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author')); _e( 'Author archive: ', LANGUAGE_ZONE ); echo $curauth->nickname; elseif( is_date() ): _e( 'Date archive: ', LANGUAGE_ZONE ); echo single_month_title( ' ', false ); else: global $post; _e( 'Archive: ', LANGUAGE_ZONE ); if( $post ) echo get_post_format_string(get_post_format()); else echo 'Standard'; endif; ?></h2> <!-- archive --> <?php do_action('dt_layout_before_loop', 'index'); global $wp_query; dt_storage( 'post_is_first', 1 ); if ( have_posts() ) { while( have_posts() ) { the_post(); get_template_part('content', get_post_format() ); } if( function_exists('wp_pagenavi') ) { wp_pagenavi(); } } ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>or maybe in dt-blog.php (the template I’m using to display the archive):
`
<?php
/* Template Name: 05. Blog */dt_storage( ‘have_sidebar’, true );
do_action( ‘dt_layout_before_header-blog’ );
get_header();
?><?php get_template_part( ‘top-bg’ ); ?>
<div id=”wrapper”>
<?php get_template_part( ‘nav’ ); ?>
<div id=”container”<?php echo dt_get_container_class(); ?>>
<h2><?php the_title(); ?></h2>
<h2><?php the_subtitle(); ?></h2><?php
if ( have_posts() ) {
while ( have_posts() ) { the_post();
do_action( ‘dt_layout_before_loop’, ‘dt-blog’ );
global $DT_QUERY;
if ( $DT_QUERY->have_posts() ) {
while ( $DT_QUERY->have_posts() ) {
$DT_QUERY->the_post();
get_template_part( ‘content’, get_post_format() );
}if ( function_exists( ‘wp_pagenavi’ ) ) {
wp_pagenavi( $DT_QUERY );
}
}
wp_reset_postdata();
}
}
?></div>
<?php get_sidebar(); ?>
</div>
<?php get_footer(); ?>
‘OR maybe I’m way off base. 🙂 Either way, thanks for your help.
The topic ‘Archives Display Full Posts with Formatting’ is closed to new replies.