Remove from month view

Home Forums Calendar Products Events Calendar PRO Remove from month view

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1233623
    Tristan
    Participant

    Hi all,

    As part of our ongoing improvements of our calendar we wish to remove all the data which appears on line 28 of our code starting with <script type=”application/ld+json”> to reduce the page size and loading speed.

    This data we believe does drive day / week and even list view but we are happy to sacrifice these to acheive a faster loading page.

    You can find our calendar here and if you view source https://thewhiteisle.co.uk/ibiza-clubbing-calendar/ on July or August you can see the amount of data it produces which we no longer need

    Many thanks

    Tristan

    #1234413
    Barry
    Member

    Hi Tristan,

    Does the following snippet work for your purposes?

    function remove_json_ld_from_month_view( $feed ) {
       return tribe_is_month() ? '' : $feed;
    }
    
    add_filter( 'tribe_json_ld_markup', 'remove_json_ld_from_month_view' );

    You could add this to a custom plugin or even to your theme/child theme’s functions.php file, if you prefer—and please don’t hesitate to let me know if you need further assistance on that front.

    #1234426
    Tristan
    Participant

    Hi Barry,

    You sir are a legend worked perfectly.

    A great way to reduce the loading time and overall size of the page.

    Thank you so so much

    Tristan

    #1234786
    Barry
    Member

    Happy to help 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove from month view’ is closed to new replies.