Remove Date & Time Schema for Specific Events

Home Forums Calendar Products Events Calendar PRO Remove Date & Time Schema for Specific Events

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1407974
    Anthony
    Participant

    I have implemented some code to allow me to have TBA listed for an event where we do not have a time and date determined yet.
    The basic principle is that i set the date to 1900-01-01 for start and end, as well as set the time to midnight for start and end. At that point i can do if then statements in the template to swap out the time and date for TBA or any other text.

    The issue is that the schema for search engines still shows up on the page with the date and time of 1900-01-01 and midnight.

    I am trying to figure out what file creates that schema so that i can either edit it and add an if then statement or figure out is there is a filter i can hook into to edit it through an action or filter hook from the functions.php so i don’t have to edit a core file.

    #1408676

    Hi Anthony,

    Thanks so much for reaching out!

    The following forum posts have some more information about how search engines display your data and have some plugin suggestions for how to alter things:

    In addition, you may be interested in our Themer’s Guide, which can show you the different templates and views that are available to edit:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    Let me know how it goes and if you have any other questions along the way!

     

    Thanks,

    Jaime

    #1409018
    Anthony
    Participant

    Thank you for the information, however the plugin you recommend is only for “editing” the data being sent to google, and i need to disable the output.

    I need to edit the file that actually creates the schema data, in the events calendar plugin, to be output to html so that i can add an “if/then” statement to the code in order to allow this specific event to have NO schema data for date and time AT ALL listed in the outputted html. I just don’t know which file that is, and the “themers guide” doesn’t list it because it’s a core file that needs to be edited, not a template file that can be moved to the child theme. Ideally if there is a hook that i can use to affect the function that creates the data output, that would be awesome, but since this feature request dates back to 2013, I assume its going to need to be a core file edit.

    The only data google can see about this event currently IS in the LD+JSON script on the page as ALL other dates and times for the event have been changed to “TBA” in the html, so the only thing that google can pickup is this data that i need to disable.

    #1409087
    Anthony
    Participant

    Also,

    I will gladly write the plugin code to do the work, I just need some information on how the Tribe__Events__JSON_LD__Event function or the tribe_json_ld_{type}_object filter is used in order to affect the output of the data.

    Something along the lines of

    $args = array(
    date=>'new date',
    time=>'new time');
    apply_filters( "tribe_json_ld_{$type}_data", $data, $args );

    so that it keeps the old data and just changes the date and time to be not what is initially listed…

    #1409639

    Hi Anthony,

    Just to let you know, we are limited by our Support Policy in how much we can help with customizations, but I will try to point you in the right direction.

    Here is a function that you may be interested and some more information about it:

    https://theeventscalendar.com/function/tribe_events_template_data/

    You can also look through our functions archive here:

    https://theeventscalendar.com/functions/

    In addition, the following forum post contains a snippet that can disable JSON:

    https://theeventscalendar.com/support/forums/topic/google-search-crawlingdisplaying-incorrect-date-from-plugins-json/

    Let me know how that goes!

     

    Thanks,

    Jaime

    #1423550
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Remove Date & Time Schema for Specific Events’ is closed to new replies.