How to remove the post excerpt or preview content from within the post? (4 posts)

  1. hausjell
    Posted 2 years ago #

    On the front page of my site it shows the content before -read-more- link, then when you click in the post it shows that + the post content. Is there a to do this:

    1) Retain current index style (with read more links)
    2) When a user clicks the read more option they are taken to the post, but the content before read-more is hidden within the post and only the content after read-more is shown.

    Hope that makes sense, here is my site: http://www.epicy.com.

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    review the use of the $stripteaser parameter in http://codex.wordpress.org/Function_Reference/the_content

    in single.php

  3. hausjell
    Posted 2 years ago #

     * The Template for displaying all single posts.
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
    get_header(); ?>
    		<div id="primary">
    			<div id="content" role="main">
    				<?php while ( have_posts() ) : the_post(); ?>
    					<nav id="nav-single">
    						<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    						<span class="nav-previous"><?php previous_post_link( '%link', __( '<div id="nav_left"></div>', 'twentyeleven' ) ); ?></span>
    						<span class="nav-next"><?php next_post_link( '%link', __( '<div id="nav_right"></div>', 'twentyeleven' ) ); ?></span>
    					</nav><!-- #nav-single -->
    					<?php get_template_part( 'content', 'single' ); ?>
    					<?php comments_template( '', true ); ?>
    				<?php endwhile; // end of the loop. ?>
    			</div><!-- #content -->
    		</div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    I can't seem to find where to put it on there, any ideas? Thank you for your reply btw.

  4. hausjell
    Posted 2 years ago #

    Ah found it sorry, was in content-single.php.

    For anyone else with a similar set up wishing to do the same thing,

    <?php the_content($stripteaser, 1); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.