php - Wordpress: Recent posts on homepage outside of ForEach loop? -


i'm new wordpress , can't head around displaying recent posts on homepage without being in foreach loop. creating site displays recent posts on homepage in block layout (see screenshot of static page: http://prntscr.com/etriud), except 1 of blocks intentionally larger others , why foreach loop won't work.

is there way display recent posts outside of foreach loop on page? in advance!

without seeing code, it's hard specific. if know want display first image differently rest, can still use foreach construct.

$posts = array(); $i=0; // start counter @ 0 foreach ($posts $post) {     $i++; // increment counter on each loop...     if ($i == 1) {         // different first post..     } else {         // normal stuff...     } } 

Comments

Popular posts from this blog

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -