Help Desk

What category are Events and Venues? How to exclude them from Search Results?

  • Posts: 9 Topics: 3
    | Permalink

    Is there a way to refer to events and calendar pages? I’m using the plugin on http://offmetro.com/sf/ and would like to exclude the Events and Venues pages from my search results page. Is there a way to refer to them as a category? I can exclude certain categories from the search results, and it would be helpful if they had a category ID that I could refer to, and that I could exclude that category.

    Thanks!
    Vince

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hi Vince, thanks for the note. This is a good question – it hasn’t ever come up yet, but my suspicion is no. Let me check with the developer who built this though, in case he has any suggestions. Give me a day or two to get you a response on this.

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    I actually can tell with categories, you can find it by going to the backend of your site, clicking into a given category name from Event Categories, and viewing the number that appears in the URL bar. That what you’re looking for?

    Let me find out for venues. I see those create a page, not a category, so not sure how that’d be handled.

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hey again Vince. I talked this over with my dev today. Modifying the code to do this wouldn’t be very practical, from the looks of things. You may want to try a plugin such as Relevanssi that let’s you customize your search much more. For example, you can exclude categories, tags and posts and pages from your search. Here’s the plugin: http://wordpress.org/extend/plugins/relevanssi/ – I’ve been told by our dev that he used it in a number of his sites and it’s done exactly what you’re looking for here.

    Posts: 9 Topics: 3
    | Permalink

    Hi Rob – thanks for the responses and for looking into this! I was actually already using Relevanssi, and was hoping to use it to exclude the category for Events and Venues in my search results. However, the Event and Venue categories don’t show up in the Posts/Categories list. So there is no way to find the category ID. Perhaps there is a way to find out the category id in the database – i’ll look into that next (or let me know if you know this offhand).

    Thanks!
    Vince

    Posts: 4278 Topics: 105 Answers: 467
    | Permalink

    Hey Vince. You can check out the category ID (if I understand what you’re trying to do correctly) by going into the category list on the backend and snagging the number that appears in the URL bar. It should be in the database as well. That help?