• Hi,
    I’m trying to display a different category on different parts of my main page.
    More specifically, what I want to achieve is to have all the posts from one category come up on one column of a table, and posts from all the other categories in the second column.
    I’ve tried the Posts By Category hack but the second column always shows up with the same posts as in the first.
    Can anyone please help?
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • It may be a work in progress but it would really help the css positioning guys to see a link to the site.

    Thread Starter Anonymous

    I actually trying to do exactly the same as the person who has started this thread.

    You have two ways to go about it: One is by filtering out categories for the entire page. You can achive this by adding $cat = '#' at the top of your WP header. The page will then display only posts from category #. You can select more categories to display by adding to the line seperated by a space like so: $cat = '3 4 5' which only displays categories 3, 4 and 5.
    Putting a minus sign: -# results in a category being filtered out. So you can have $cat = '-5' which will display all posts but those from category 5.
    The technique above is for PAGE-WIDE category filtering.
    From WP 1.2, you can have multiple loops on one page. A post to controlling these loops as to the number of posts they will display and from what category can be found here:
    https://www.ads-software.com/support/10/6012/
    You may want to put a WP loop in a column then apply the necessary filters on them. See the post for more details.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Categories in different columns’ is closed to new replies.