WordPress.org

Support

Support » Themes and Templates » Portfolio Press » [Resolved] Excerpt not showing

[Resolved] Excerpt not showing

  • Hey! Great theme, i’m enjoying it very much, and customizing it as i want.
    But i still have a few problems, especially in the portfolio page.

    There’s a field for the excerpt, but this is not showing anywhere. I imagine it should be appearing below the text or something like that. What’s wrong here?
    The same with date and category.

    Also, i’d like to take the title (and eventually the excerpt) out of the “image area”, because i’m thinking about changing the transition for something else.

    Thanks a lot in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m having the same problem.

    When I click on my “blog” link, instead of seeing an exceprt for my post, I see the entire post.

    Any help?

    i finally solved my problem with
    <?php the_excerpt() ?>

    i just added it in content-portfolio.php

    So all I have to do is add that line of code to content-portfolio.php and the excerpt shows up on the blog page?

    José, i think that will work, i’ll paste my own content-portfolio.php hope you can find it useful.
    The result, workingh togheter with the css, is
    – CATEGORY
    – FEATURED IMAGE
    -TITLE
    – EXCERPT

    <?php
    /**
     * This template displays portfolio post content
     *
     * @package Portfolio Press
     */
    
    if ( post_password_required() ) {
    	echo get_the_password_form();
    } else {
    	// Set the size of the thumbnails and content width
    	$fullwidth = false;
    	if ( of_get_option( 'portfolio_sidebar' ) || is_page_template('full-width-portfolio.php') )
    		$fullwidth = true;
    
    	$thumbnail = 'portfolio-thumbnail';
    
    	if ( $fullwidth )
    		$thumbnail = 'portfolio-thumbnail-fullwidth';
    
    	// This displays the portfolio full width, but doesn't change thumbnail sizes
    	if ( of_get_option('layout','layout-2cr') ==  'layout-1col' )
    		$fullwidth = true;
    
    	// Query posts if this is being used as a page template
    	if ( is_page_template() ) {
    
    		global $paged;
    
    		if ( get_query_var( 'paged' ) )
    			$paged = get_query_var( 'paged' );
    		elseif ( get_query_var( 'page' ) )
    			$paged = get_query_var( 'page' );
    		else
    			$paged = 1;
    
    		$args = array(
    			'post_type' => 'portfolio',
    			'posts_per_page' => 9,
    			'paged' => $paged );
    		query_posts( $args );
    	}
    ?>
    <div id="portfolio"<?php if ( $fullwidth ) { echo ' class="full-width"'; }?>>
    
    	<?php if ( is_tax() ): ?>
    	<header class="entry-header">
    		<h1 class="entry-title"><?php echo single_cat_title( '', false ); ?></h1>
    		<?php $categorydesc = category_description(); if ( ! empty( $categorydesc ) ) echo apply_filters( 'archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>' ); ?>
    	</header>
    
    	<?php endif; ?>
    
    	<?php  if ( have_posts() ) : $count = 0;
    		while ( have_posts() ) : the_post(); $count++;
    		$classes = 'portfolio-item item-' . $count;
    		if ( $count % 3 == 0 ) {
    			$classes .= ' ie-col3';
    		}
    		if ( !has_post_thumbnail() ) {
    			$classes .= ' no-thumb';
    		} ?>
    		<div class="<?php echo $classes; ?>">
    			<div class="categoria">
    			<?php
    			$cat_list = get_the_term_list( $post->ID, 'portfolio_category', '', ', ', '' );
    			$tag_list = get_the_term_list( $post->ID, 'portfolio_tag', '', ', ', '' );
    			$utility_text = '';
    			if ( ( $cat_list ) && ( '' ==  $tag_list ) )
    				$utility_text = __( '%1$s', 'portfoliopress' );
    			printf(
    				$utility_text,
    				$cat_list,
    				$tag_list
    			);
    			?></div>
    			<?php if ( has_post_thumbnail() ) { ?>
    			<a href="<?php the_permalink() ?>" rel="bookmark" class="thumb"><?php the_post_thumbnail( $thumbnail ); ?></a>
    			<?php } ?>
    			<a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title() ?></a><?php the_meta(); ?>
    			<div class="excerpt"><?php the_excerpt() ?></div>
    
    		</div>
    
    		<?php endwhile; ?>
    
            <?php portfoliopress_content_nav(); ?>
    
    		<?php else: ?>
    
    			<h2 class="title"><?php _e( 'Sorry, no posts matched your criteria.', 'portfoliopress' ) ?></h2>
    
    	<?php endif; ?>
    
    </div><!-- #portfolio -->
    <?php } ?>

    Hmm, still didn’t work for me. Not sure what I’m doing wrong.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Excerpt not showing’ is closed to new replies.
Skip to toolbar