• Hello –

    I am wondering if this is possible:

    On my search results page, I need the results to display differently based on the category.

    The left column will display results from Category A, the right column will display results from Category B.

    Any ideas?

    Thanks!

Viewing 1 replies (of 1 total)
  • I think this approach will work:

    foreach post
       if in category A
          add to A array
       elseif in category B
          add to B array
       endif
    endforeach
    while either array is not empty
       start a row div
          if A array is not empty
             pop off one post from A array
             display the A post
          endif
          if B array is not empty
             pop off one post from B array
             display the B post
          endif
       end row div
    endwhile
Viewing 1 replies (of 1 total)
  • The topic ‘Segmenting Search Results Based on Category?’ is closed to new replies.