WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] posts - excerpt and sticky (9 posts)

  1. webwitch
    Member
    Posted 3 years ago #

    Hi, I have written a test post and selected sticky but I don't seem to get the sticky styling to show.

    Also I would like excerpts on the News page. At the moment it is listing the full content. I would like to see the full content only on the single post page.

    Am I missing something here? I thought the default was to display the excerpt.

    Thanks for any help.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Your theme will be using <?php the content();?> instead of <?php the_excerpt;?> in its template files. Simply edit the relevant template files and replace <?php the_content();?> with <?php the_excerpt;?>.

  3. webwitch
    Member
    Posted 3 years ago #

    Thanks for your help. I am using TwentyTen and have looked in index.php
    as well as loop.php but can't find the code to display the excerpt. Any pointers please?

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    Try looking in the 3rd loop within loop.php.

  5. webwitch
    Member
    Posted 3 years ago #

    Thanks - found it! Archives and search was set to excerpt and posts to content so have changed it.

    Any ideas on the non-display of the sticky styling?

    Cheers

  6. esmi
    Forum Moderator
    Posted 3 years ago #

    Site url?

  7. webwitch
    Member
    Posted 3 years ago #

    Thanks esmi. The sticky post stays at the top of the news page as it should but has no background styling. It's here.

  8. esmi
    Forum Moderator
    Posted 3 years ago #

    Edit style.css:

    .home .sticky {
    	background: #f2f7fc;
    	border-top: 4px solid #000;
    	margin-left: -20px;
    	margin-right: -20px;
    	padding: 18px 20px;
    }

    and change .home to .blog.

  9. webwitch
    Member
    Posted 3 years ago #

    Great thanks! Problem solved. Thanks so much esmi.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags