• I have a home page that shows excerpts but above these posts (before the loop in code) I want to display one individual post in full. If I use the “sticky” function of course that post gets abbreviated like the other posts.

    I read up on “get_posts” but can’t seem to grasp how to get a single post by id – which is what I imagine I need to do.

    Please help or point me to the right page in the codex!!

    Thanks!

    George

Viewing 2 replies - 1 through 2 (of 2 total)
  • You can always sticky it, and add the ENTIRE post to the excerpt section….if you are using <?php the_excerpt(); ?> to grab it.

    get a variable $counter = 1; inside the loop write a condition like

    if($counter == 1){
     the_content();
    }else{
     the_excerpt();
    }
    
    $counter++;
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘show single post above the loop on home page’ is closed to new replies.