• Hello,

    I have two search forms on my website, one for 1 category and the other for a different category, both exclusive.

    I would like to know if there is a way to difference both results page, maybe inheriting the category from the posts category they search in, or applying some custom meta or tags or something like that. The thing is that I would like to differenciate between two results pages as later some widgets should be different for each results page, so I can use the “visibility” functionality from wordpress for widgets.

    Please help ?? thanks in advance.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Well, separate pages are truly separate. The server doesn’t know what the other page’s results were by the time it gets to the current page. Unless the previous page’s criteria was explicitly passed on to the current page some how.

    What would be easier to accomplish is to have two fields, an include and exclude field. Then the results query can get posts in one category that do not have the other category. This is simpler and more straight forward than trying to difference the posts of two different pages, yet you end up with the same results.

    Or are you looking for XOR logic? Posts that have one category or the other, but not both? This too can be accomplished with two fields. The query is more complicated to setup, but still better than trying to work from other results pages.

Viewing 1 replies (of 1 total)
  • The topic ‘Having various results pages’ is closed to new replies.