Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Separate post formats in WordPress

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #42305
    mbt
    Member

    I was wondering how to create a layout like that of the CSS Tricks homepage whereby ‘standard’ posts are shown on the left and ‘link’ posts on the right.

    How would I achieve this layout? Would it involve having to manipulate post formats in WordPress?

    Any help would be appreciated.

    #125706
    tomrogers123
    Member

    Although I’ll have time to write a more detailed post later – with some example code – the quick answer is that you will need to run a custom loop to get only links as the default only outputs posts. In order to do this, there are several routes you can take: using [query_posts()](http://codex.wordpress.org/Function_Reference/query_posts “”) ([screencast](https://css-tricks.com/video-screencasts/91-the-wordpress-loop/ “”)) or initializing a new instance of the [WP_Query()](http://codex.wordpress.org/Class_Reference/WP_Query “”) class.

    #129063
    Chris Coyier
    Keymaster

    Yep, it’s just running multiple loops for what you need. WP_Query is great for that. It’s covered in both series in The Lodge =)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Back End’ is closed to new topics and replies.