• Now in my homepage there are the excepts of last ten posts. Can I modify this? I.e. Visualizing all the text only of lastest post and the excepts of later ones?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Just use the_content for the latest post, and the_excerpt for the others.

    I’m no PHP expert, but I would try something along these lines:

    $first=true;
    //the loop starts:
    while (have_posts()) :
    //...somewhere it will display posts
    if ($first) { the_content('More...'); $first=false;}
    else { the_excerpt('Read full post...'); }
    endwhile;

    Thread Starter acantoro

    (@acantoro)

    Thank You, but your lines make errors…
    Can I visualize only one category posts in homepage? How?

    Ah, of course there would be errors, those were just sort of like pseudo-code to outline the idea. You’d need to find out the actual function calls from the Codex, I suppose.

    Have a look at the pages on The Loop, and perhaps on Adding Asides. The former to get to know where to make changes, the latter describes handling posts based on their categories.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘modify my index.php’ is closed to new replies.