Home>Support>Filter by Category and Offset

Filter by Category and Offset

By lee, 9 years ago. Last reply by Andrew Misplon, 9 years ago.

Hi,

I am trying to accomplish a few things here in one page:
a.) to display posts based on Categories, example cat=5 , or category = Teacher
b.) Have the blogs displayed with offset, “Most recent” in first column, “2nd most recent” in the second column” and “3rd most recent”in the third column. I know carousel does part of this, we prefer the static ones.
c.) Display remainder post in as “Recent Post” and Archives

I managed the filter by category but didnt managed to:
1. get the offset to work for the second and third column
2. display remainder posts, filtered by category.

URL: http://upstore.com.my/englisheagleasia/for-teachers/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 8 months ago lee

    Previously I managed to achieve it by “query_posts(‘posts_per_page=5&offset=1’);” but it didnt seemed to work when now.

  2. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Hi Lee

    The Carousel Widget would be the best bet here. Arguments like cat=1 or cat=1,2,3,4 would pull category ID’s for you. The widget’s additional field can be used for this. Remember to just say cat=x, don’t include query_posts. Posts per page is a widget setting so you don’t need that. I’ve never tried offset, you could try: cat=1&offset=1 and see if that works.

  3. 9 years, 8 months ago lee

    Thanks Andrew,

    THe “cat=1&offset=1” you suggested worked :)

    Do you think i can apply filters like cat=1 for
    a.) Recent Posts
    b.) Archives

  4. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    Super, glad that did the trick.

    Not quite following there. Yes, it’s possible to filter the built in Archive pages but it would require a child theme and creating your own loops in template files, it’s a custom development level task.

  5. 9 years, 8 months ago lee

    Thanks Andrew,

    I will try the child theme and let u know again (probably in a new thread) :) Have a good day

    thanks for the great support

  6. 9 years, 8 months ago Andrew Misplon
    Hi, I Work Here

    For sure, you too.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More