WordPress.org

Ready to get started?Download WordPress

Forums

Parament
[resolved] excert to long (5 posts)

  1. RazelDazel2
    Member
    Posted 1 year ago #

    i noticed that the excerts are not really excerts. it basically posts the full article/ post. shouldn't this be limited to 55 words or 30 words?
    http://www.pitime.net
    thanks,

    http://wordpress.org/extend/themes/parament/

  2. RazelDazel2
    Member
    Posted 1 year ago #

    also having problems creating page templates.
    this is what i have now:

    <?php /* Template Name: News*/ ?>
    <?php get_header(); ?>
    
    <div id="container" class="contain">
    	<div id="main" role="main">
    		<?php query_posts('cat=55'); while ( have_posts() ) : the_post(); ?>
    		<?php if ( have_posts() ) : ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    				<?php get_template_part( 'content', 'page' ); ?>
    			<?php endwhile; ?>
    		<?php else : ?>
    			<?php get_template_part( 'content', '404' ); ?>
    		<?php endif; ?>
    		<?php comments_template(); ?>
    	</div><!-- end main -->
    
    	<?php get_sidebar(); ?>
    
    </div><!-- end container -->
    
    <?php get_footer(); ?>
  3. RazelDazel2
    Member
    Posted 1 year ago #

    any ideas?

  4. Lance Willett
    Themer
    Posted 1 year ago #

    Hi RazelDazel2,
    What filename did you call the page template? Try page-news.php

    How are you using excerpts?

  5. RazelDazel2
    Member
    Posted 1 year ago #

    thanks Lance,
    what have not realized is that in the code example above i pointed the template part to the content instead to the excerpt which is/was the default setting for the original theme.

    i actually did go so far to create my own excerpt function in the functions.php before i realized it. there already is an excerpt function in WP so there is no need to create one unless you want to customize it.

    i wanted the excerpts as short bits to articles in my news feed. instead of having readers scroll through lengthy articles, they can read the excerpts and if they see something they want to know more about they can open the article page.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags