How to display that search results are an event

Home Forums Calendar Products Events Calendar PRO How to display that search results are an event

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #92443
    Kelly
    Participant

    Hi there. Looking for a bit of PHP help. I am building a search results page right now. When a user searches for a term, I want to be able to display what type of results are shown. I’m able to do this with the regular WP pages using <?php the_category(); ?>, but I can’t figure out how to call it for events. I don’t need the Event’s category itself. I’d just like to be able to list “EVENT” next to the result.

    Thanks so much 🙂

    #93129
    Brook
    Participant

    Howdy dotwongdotcom,

    The function tribe_is_event() is probably what you are looking for. If you are ever looking for something similar, checkout that link. In the left hand pane you will find a full list of all the various functions available.

    Did that work for you? Please let me know. Thanks!

    – Brook

    #93159
    Kelly
    Participant

    That’s the one! Thanks. My knowledge of PHP mostly comes from common sense, so a bit of guidance is very helpful. I appreciate it.

    #93566
    Brook
    Participant

    I understand that. Before getting trained in PHP and picking up some books I was doing edits using common sense as well. I am glad it worked!

    By the way, if you have a minute or two, we will love it if you would write a few words for us here: http://wordpress.org/support/view/plugin-reviews/the-events-calendar?filter=5. Happy site building!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to display that search results are an event’ is closed to new replies.