Forums

How to make 2nd blog entry smaller then 1st (4 posts)

  1. imagineboris
    Member
    Posted 4 years ago #

    Hello everyone,
    I'm very new to Word Press and right now simply editing default Theme to what I want it to look like. I was wondering if you could help me with this. On index page I'm trying to make it so 2nd blog post display less (or none) text then 1st post.

    Thank you very much for your help :-)

  2. mojorob
    Member
    Posted 4 years ago #

    Do you only want 1 blog post to be on the index page? If so you can select that option in Settings on the dashboard.

  3. imagineboris
    Member
    Posted 4 years ago #

    hi, thank you for reply. Actually no, i found an option for displaying number of posts on a first page. I'm trying to figure out how to make it so all other posts except latest one on homepage have even less content displayed

  4. Otto
    Tech Ninja
    Posted 4 years ago #

    You need to modify your loop so that it does something different for the first post than for the rest.

    Something like this would work:

    $count=0;
    while (have_posts()) :
    $count++;
    ...
    if ($count == 1) the_content(...);
    else the_excerpt(...);
    ...
    endwhile;

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.