WordPress.org

Ready to get started?Download WordPress

Forums

First article full then excerpts (3 posts)

  1. allkary
    Member
    Posted 2 years ago #

    Hello everyone.
    I'm perfectly aware that many other threads does have the very same title already and I spent my last 3 (or maybe even 4!) days checking as many as I could. Unfortunately it seems that none of them actually solves my problems, so I thought it would have been faster to ask directly for my specific case.

    I'm coming to a self hosted wordpress blog directly from Bogger platform, so I'm totally new to php codes. I've tried to edit my template using the bit of html knowledge I have, but I'd really like to have the very first post of my blog to show entirely, leaving the olders as excerpts.

    I trust that the involved code on my index.php is this one

    <?php if ( $options['excerpt_check']=='true' ) { the_excerpt(__('Continua a leggere »','latorredicotone')); } else { the_content(__('Continua a leggere »','latorredicotone')); } ?>

    I would really appreciate if someone could give me some advices, all I get by myself is a white screen.

  2. try:

    <?php if ( $options['excerpt_check']=='true' && $wp_query->current_post >= 1 ) { the_excerpt(__('Continua a leggere »','latorredicotone')); } else { the_content(__('Continua a leggere »','latorredicotone')); } ?>

    this part && $wp_query->current_post >= 1 checks the position of the post in the loop.

  3. allkary
    Member
    Posted 2 years ago #

    That works!
    Thanks a lot, I sincerely admire your knowledge.
    :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.