WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Display full post on category page (6 posts)

  1. pocketmo
    Member
    Posted 10 months ago #

    I am using xin-magazine theme and need to display the full posts on the category pages such as abe.paulatiller.com/category/information-technology

    The category template appears not to use the 'the_content()' or 'the_excerpt' which means that I can't implement 'the_content()' to display the full post.

    If anyone can help I'd be very grateful. This is a work experience project with no budget.

  2. Evan Herman
    Member
    Posted 10 months ago #

    Are you able to provide the code for the file that is pulling the posts on to the page?

  3. pocketmo
    Member
    Posted 10 months ago #

    This is the category.php code - I'm not sure if this is the correct file in terms of pulling in the posts:

    <?php
    /**
     * @package xinmag
     * @since 1.0
     */
    get_header();
    	global $cat; //WP global variable
    	if ( get_query_var('paged') )
    	    $paged = get_query_var('paged');
    	elseif ( get_query_var('page') )
    	    $paged = get_query_var('page');
    	else
    		$paged = 1;
    ?>
    <div id="content" class="<?php echo xinwp_content_class(); ?>" role="main">
    <?php
    	if ( have_posts() ) {
    		xinmag_content_nav( 'nav-above' );
    		xinmag_section_title();
    		$count = 0;
    		while ( have_posts() ) {
    			the_post();
    			if ( 1 == $paged && 0 == $count )
    				get_template_part( 'content' );
    			else {
    				if ( 1 == $paged && 1 == $count ) {
    					$color_class = "bgcolor_" . $cat;
    					echo '<h2 class="section-more ' . $color_class . '">';
    					_e( 'More from ', 'xinmag' );
    					single_tag_title( '' );
    					echo '</h2>';
    				}
    				get_template_part( 'content', 'magazine' );
    			}
    			$count++;
    		}
    		xinmag_content_nav( 'nav-below' );
    	} elseif ( current_user_can( 'edit_posts' ) ) {
    		get_template_part( 'content-none', 'index' );
    	} ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  4. pocketmo
    Member
    Posted 10 months ago #

    I found it - it was in a file called content-magazine.php and I changed 'the_excerpt()' to 'the_content()'.

    Thank you for taking the time to look at it.

  5. pocketmo
    Member
    Posted 10 months ago #

    Forgot to mark the last post as resolved. Apologies.

  6. Evan Herman
    Member
    Posted 10 months ago #

    Nice job on figuring it out!

    Have a great day

Reply

You must log in to post.

About this Topic