WordPress.org

Ready to get started?Download WordPress

Forums

Coraline
[resolved] Excerpts in categories? (6 posts)

  1. Kisarune
    Member
    Posted 2 years ago #

    Using Coraline, how do you put excerpts within categories? I have certain categories as menu options at the top of my site.
    When I click to go to these categories, I have to scroll through long posts like I would the homepage.

    I want to be able to have excerpts for the posts instead, but still have full posts on the home page. Does that make sense?
    I've tried editing the loop but that just makes it so there are excerpts even on the front page too.

    I've searched various sites on how to do this, and have tried three different plug-in's and I don't like what I am getting at all. o.O I want just the normal clean looking excerpts with no images.

    I have also checked within the category php, style sheet, functions php, theme options php, and index php. I'm still unable to figure out a decent option here.
    o.O I don't particularly want to change themes, but maybe I will have to? @_@

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

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    from looking into the code of caraline's loop.php, it seems that you should get excerpts by default.

    have you edited anything in loop.php?

    if so, please paste the full code of loop.php into a http://pastebin.com/ and post the link to it here - how-to: http://codex.wordpress.org/Forum_Welcome#Posting_Code

    it might also be useful if you could post a link to your site.

  3. Kisarune
    Member
    Posted 2 years ago #

    Not that I don't believe I haven't already changed back.

    Here's the postbin of the code.
    I did manage to get it so that I could have most posts show when I click into a category, which is nice, but I'm still scratching my head over getting the_excerpt in just for categories and not for the home page.
    The website is http://ohayookasan.com

  4. pixel-Jay
    Member
    Posted 2 years ago #

    @Kisarune, I agree with alchymyth, it should work that way by default, but looking at the loop, it seems the it needs one more conditional, is_category().

    Try this:

    In your loop.php find these lines:

    <?php if ( is_search() ) : // Display excerpts for search. ?>
        <div class="entry-summary">
        <?php the_excerpt(); ?>
       </div><!-- .entry-summary -->

    Right after that (before the else statement) paste:

    <?php elseif ( is_category() ) : ?>
        <div class="entry-summary">
        <?php the_excerpt(); ?>
       </div><!-- .entry-summary -->

    That should display excerpts for the categories.

    Hope this helps

  5. Kisarune
    Member
    Posted 2 years ago #

    *gasp* It works! See, I was wondering why there wasn't a is_category in there. o.O I just wasn't able to figure out too much exactly how to go around writing it. Which, in retrospect seems foolish.

    Thank you so much for your assistance pixel-Jay!! Now it does exactly what I wanted!!

  6. swingJazz (Jimmy Saputra)
    Member
    Posted 1 year ago #

    Thank you very much alchymyth and pixel-Jay

    Works wonderful and amazing

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags