Modifying Structured Data

Home Forums Calendar Products Events Calendar PRO Modifying Structured Data

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1455770
    Sean
    Participant

    Hi Andras,

    I wanted to follow up to our original post, as I inadvertently closed it before replying. Is there an example of how we could remove data from being included in the markup used by search engines? For example, if we wanted to only have the Event Name, addressLocality and addressRegion displayed in a table in the search results for List View? Thank you.

    #1457570
    Andras
    Keymaster

    Hi Karly,

    Is that regarding the structured data? (this thread: https://theeventscalendar.com/support/forums/topic/change-tec-schema-org-structured-data/)

    The data can be overridden and adjusted via filter hooks including tribe_json_ld_event_data and tribe_json_ld_markup

    Something like:

    add_filter( 'tribe_json_ld_event_data', 'my_func', 10, 2 );
    function my_func( $data, $args ) {
    // Do something with $data
    return $data;
    }

    or

    add_filter( 'tribe_json_ld_markup', 'my_func' );
    function my_func( $html ) {
    // Do something with $html
    return $html;
    }

    Andras

    #1460131
    Sean
    Participant

    Hi Andras,

    Yes, that is the correct thread. Thanks for pointing us in the right direction!

    Best,
    Karly

    #1460249
    Andras
    Keymaster

    You’re very welcome Karly! Happy to be of help.

    Since this is marked resolved I am going to close this ticket, but if you need anything else related to this topic or another please create a new ticket and we’ll be happy to help.

    Cheers,
    Andras

     

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Modifying Structured Data’ is closed to new replies.