• Resolved belledumonde

    (@belledumonde)


    I’ve been trying to figure out how to do this and obviously have not succeeded. These are the things I’d like with some alternatives if they’re not possible:

    Option one:

    The latest post on the homepage is shown in full. The next 4 latests posts are shown up to the “Read the rest of this entry” part. If a post has not been split with the <!- More -> tag then it is automatically cut after a specified number of characters and then a “Read the rest of this entry” link is shown.

    Option one variation:

    One post is shown in full on the homepage and clicking on “Previous entries” shows the last 5 posts with the conditions above.

    Option two:

    First post is shown using the_content, the rest are shown using the_excerpt.

    Option two variation:

    One post is shown on the homepage using the_content and clicking on previous entries will show the next 5 latest using the_excerpt.

    I’ve looked for plugins to do this but I believe this has something to do with the loop. But maybe I need a plugin that allows me to change the_excerpt the way I want in option one?

    Any help on this would be much appreciated. Thank you!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter belledumonde

    (@belledumonde)

    Cool, I found http://www.webspaceworks.com/resources/wordpress/44/ to do the part of choosing how long an excerpt should be etc but I still don’t know how to do the rest use the_content for the first entry and the_excerpt for the rest. Help anybody? Thanks!

    A search here turned up: http://wordpress.org/support/topic/35504?replies=23

    There are quite a few other similar posts that you might look over as well.

    Hope that helps.

    Thread Starter belledumonde

    (@belledumonde)

    Thanks for those! I’m looking at them now. I have a quick question though. Is it possible to have only one post on the home page then when you click “previous entries” it shows the next 5 as excerpts? I tried using home.php and thought that the next entries would use index.php but i found it uses home too.

    Thread Starter belledumonde

    (@belledumonde)

    I successfully managed to do it but there is a slightly major problem. When I click previous entries it keep showing the contents of the home page even if i keep going back and back.

    Here is my code. I hope it helps. Could you point out where I’m going wrong and how I can clean up the code? That would be fantastic. Thank you.

    http:///belledumonde.awardspace.com/home.txt

    Thread Starter belledumonde

    (@belledumonde)

    I forgot to say what I’m actually after. That full post on the home page is only on the first page. After that everything else is posted as excerpts including on the previous entries. I can’t seem to get it to work that way though. I thought the home.php would ONLY be used on the homepage and index.php would be used on the pages showing previous posts ==> http://root/page/n

    I could fix it by not having the previous entries link altogether but I’ll only do that if there is no other way to fix this.

    Thanks for any help.

    Template_Hierarchy should help clear up the home vs. index thing a bit.

    I understand what you wish to do, but alas, I don’t know how…

    Thread Starter belledumonde

    (@belledumonde)

    I think maybe using a conditional statement? is_home() for the first part showing one full post and excerpts for the rest then is_paged() to show all excerpts for the rest? I’ll try that and see how it goes then post here what happens in case anyone wants to achieve the same thing.

    Actually, I think you just want to add a counter to the loop. Start it at 1 and increment at the end of the loop.

    pseudo-code:
    If counter = 1, then
    the_content
    else
    the_excerpt
    end if

    Something along those lines?

    Thread Starter belledumonde

    (@belledumonde)

    That sounds a lot simpler. Mind my ignorance to php, I only know which bits of code to copy and paste to get things working, forget implementing something new. So where abouts would that go in the loop?

    This is a regular topic around here:

    http://wordpress.org/search/different+first+post?forums=1

    I’m trying to do the same thing… first post shown in entirety, the rest excerpted (what my theme currently does). Was this solved?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Show first post on home page full, rest as excerpts?’ is closed to new replies.