Full article in first post, excerpt the rest for Grid Focus (4 posts)

  1. chrisjtaylor
    Posted 8 years ago #

    Is it possible to change the Grid Focus theme so that the first article is the complete post and the rest are just excerpts (the default for this theme)?

  2. Sivar
    Posted 7 years ago #

    How about this in the Loop, where it probably says <?php the_excerpt() ?> now:

    <?php if (!i) the_content(); else the_excerpt(); i=1; ?>

    Assuming you don't use "i" as a variable otherwise, it will be set after the first post (whole content) is displayed, and remains set, when that if-statement checks for the second post and more. Just an idea, I haven't tested it.

  3. chrisjtaylor
    Posted 7 years ago #

    Oh, wow! You lost me already. How would/where would I define the variable "i" in this instance?

  4. Sivar
    Posted 7 years ago #

    Just replace your line <?php the_excerpt() ?> or <?php the_content() ?>(whatever it is in your theme) in the loop with the line I provided. "i" is being defined at the end of that line. The only premise is, that you don't use a variable $i somewhere else, but that's usually not the case.

Topic Closed

This topic has been closed to new replies.

About this Topic