Forums

Excerpt shows [...] instead of the text before <!--more--> (4 posts)

  1. ydwer
    Member
    Posted 3 years ago #

    Hi,

    On my first page I have a sidebar that shows:
    - Post title
    - Date and Category
    - Post before the more tag

    After clicking on a post it shows my post on the right side and my sidebar on the left. I want the sidebar to look exactly the same as the sidebar on the front page. But now it doesn't show the text bofore the <!--more--> tag but further down till a tag that looks like this [...]

    Can anybody help?

    My code looks like:

    <h3 id="post-<?php the_ID(); ?>">" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></h3><span class="txt0"><?php edit_post_link('Edit', '', ''); ?> // <?php the_time('j F Y') ?> // <?php the_category(', ') ?></span>
    <?php the_excerpt() ?>
    </div>
    <?php endwhile; ?>
    <?php else : ?>
    <h3 class='center'>No posts found.</h3>
    <?php endif; ?>

  2. asechrest
    Member
    Posted 3 years ago #

    That's the expected functionality of the_excerpt(), which displays a teaser of the post and ignores the <!--more--> tag.

    What I think you want to use is the_content().

    Try changing this:
    <?php the_excerpt(); ?>

    To this:
    <?php the_content(); ?>

    See if that works.

  3. mitchrenton
    Member
    Posted 3 years ago #

    Hey i am using excerpt instead of content because i dont want to show the image thats in the post. But i would like a read more instead of [..].

    Is it possible to either edit the_content so that it doesn't display the image or edit the_excerpt so that there is a read more displayed?

    Thanks

  4. ydwer
    Member
    Posted 3 years ago #

    I tried <?php the_content(); ?> instead but then the whole post apears... :(

Topic Closed

This topic has been closed to new replies.

About this Topic