I want to show first post wider than other posts on the index page of my wordpress theme like firstpost.com.
Please suggest me how to do this?
|
I want to show first post wider than other posts on the index page of my wordpress theme like firstpost.com. Please suggest me how to do this? |
|||||||
|
|
you create a variable that holds the count of the loop. then with every iteration you increment this variable. in your loop you can check for the first post to do something else then the rest of the posts, assign a different css class for example.
|
|||
|
when you start loop take one variable $i=1; and increament this variable with 1 everytime loop is running now you've to check if $i=5 or $i=10 (the number of post you want) then write css for wide post else normal like all posts If you've little bit looping knowledge then this one is the easiest way. |
|||
|
|
one possible way: edit index.php of yoko; find this section:
and add this code inbetween:
full code of edited index.php: http://pastebin.com/WFKzuQXa |
||||
|
|