Support » Fixing WordPress » Exluding Category and Page from search results

  • I need to exclude a category and a page from my search loop. After trying many options this is the only way i can exclude a category, though im not sure why.

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    That works fine for excluding category 3 from the search results. However, I also need to exclude post id 143 from the results. I can’t seem to make it work. Any ideas?

  • The topic ‘Exluding Category and Page from search results’ is closed to new replies.