Ready to get started?Download WordPress


[resolved] Entire single sticky post on homepage with excerpts (4 posts)

  1. thecolonialist
    Posted 4 years ago #

    I have my homepage set up so that all the posts are displayed with their intro text and then a "read more" button. However, I have one sticky post at the top that I'd like to display in its entirety, while maintaining the "read more" system with all other posts. Is there any way to do this? Forgive me if there's something I could have found before posting this. I tried searching, but it's sort of a tough issue to find the right keywords for.

  2. MichaelH
    Posted 4 years ago #

    if (is_sticky()) {
      global $more;    // Declare global $more (before the loop).
      $more = 1;       // Set (inside the loop) to display all content, including text below more.
    } else {
      global $more;
      $more = 0;
      the_content('Read the rest of this entry &raquo;');
  3. thecolonialist
    Posted 4 years ago #

    Awesome! Thanks!

  4. mastro_
    Posted 3 years ago #

    same issue, where i have to put this code?

Topic Closed

This topic has been closed to new replies.

About this Topic