Site search shows metadata for event post date – not Event Date

Home Forums Calendar Products Community Events Site search shows metadata for event post date – not Event Date

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1101388
    Michael Henderson
    Participant

    Hey Guys,
    Any way to force WP to ignore the post date metadata tag of an event, and instead display the event date when running a simple site search?

    Thanks!

    #1101657
    Geoff B.
    Member

    Good evening Michael and welcome back!

    Thank you for reaching out to us.

    I would love to help you with this topic.

    Any way to force WP to ignore the post date metadata tag of an event, and instead display the event date when running a simple site search?

    Yes, you can totally customize WP search result pages to your liking (I am assuming you are talking about the built-in WordPress search bar and not the Tribe Events search bar).

    There are 2 ways to do this:

    1. Through your theme (or child theme) – this varies greatly from one theme to the next. The search results will usually be defined by: archive.php, search.php or archive-search.php
    2. Through a search customization plugin such as one of the following: https://wordpress.org/plugins/search.php?q=search

    If you are up for it, I would recommend approach 1 (ideally in a child theme to make it theme update resistant).
    Basically, you will need to add a conditional as to what to display when the search is returning events.

    Here’s a great example of that type of code: http://wordpress.stackexchange.com/questions/89886/how-to-create-a-custom-search-for-custom-post-type

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1107754
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Site search shows metadata for event post date – not Event Date’ is closed to new replies.