Support » Plugin: The Events Calendar » Footer CSS on every page

  • Resolved Daniel Chase

    (@riseofweb)


    First of all thank you for providing this great plugin for free.

    My issue is that the plugin is manually entering CSS and JS into the bottom of every page, even pages that are not using your plugin. Is there settings somewhere in your plugin that sets this data? Also it is redundant and bad code, placing CSS in a <script> tag. It appears that it is writing the same CSS twice.

    <script type="text/css" id="tmpl-tribe_customizer_css">.tribe-events-list .tribe-events-loop .tribe-event-featured,
    				.tribe-events-list #tribe-events-day.tribe-events-loop .tribe-event-featured,
    				.type-tribe_events.tribe-events-photo-event.tribe-event-featured .tribe-events-photo-event-wrap,
    				.type-tribe_events.tribe-events-photo-event.tribe-event-featured .tribe-events-photo-event-wrap:hover {
    					background-color: #0ea0d7;
    				}
    
    				#tribe-events-content table.tribe-events-calendar .type-tribe_events.tribe-event-featured {
    					background-color: #0ea0d7;
    				}
    
    				.tribe-events-list-widget .tribe-event-featured,
    				.tribe-events-venue-widget .tribe-event-featured,
    				.tribe-mini-calendar-list-wrapper .tribe-event-featured,
    				.tribe-events-adv-list-widget .tribe-event-featured .tribe-mini-calendar-event {
    					background-color: #0ea0d7;
    				}
    
    				.tribe-grid-body .tribe-event-featured.tribe-events-week-hourly-single {
    					background-color: rgba(14,160,215, .7 );
    					border-color: #0ea0d7;
    				}
    
    				.tribe-grid-body .tribe-event-featured.tribe-events-week-hourly-single:hover {
    					background-color: #0ea0d7;
    				}</script><style type="text/css" id="tribe_customizer_css">.tribe-events-list .tribe-events-loop .tribe-event-featured,
    				.tribe-events-list #tribe-events-day.tribe-events-loop .tribe-event-featured,
    				.type-tribe_events.tribe-events-photo-event.tribe-event-featured .tribe-events-photo-event-wrap,
    				.type-tribe_events.tribe-events-photo-event.tribe-event-featured .tribe-events-photo-event-wrap:hover {
    					background-color: #0ea0d7;
    				}
    
    				#tribe-events-content table.tribe-events-calendar .type-tribe_events.tribe-event-featured {
    					background-color: #0ea0d7;
    				}
    
    				.tribe-events-list-widget .tribe-event-featured,
    				.tribe-events-venue-widget .tribe-event-featured,
    				.tribe-mini-calendar-list-wrapper .tribe-event-featured,
    				.tribe-events-adv-list-widget .tribe-event-featured .tribe-mini-calendar-event {
    					background-color: #0ea0d7;
    				}
    
    				.tribe-grid-body .tribe-event-featured.tribe-events-week-hourly-single {
    					background-color: rgba(14,160,215, .7 );
    					border-color: #0ea0d7;
    				}
    
    				.tribe-grid-body .tribe-event-featured.tribe-events-week-hourly-single:hover {
    					background-color: #0ea0d7;
    				}</style>

    Is there a setting somewhere inside of the plugin to disable this? Is this a bug?

    Also on pages that are not using the plugin there is code that is unused.

    In the head tag:
    <link rel="htt://theeventscalendar.com" href="https://www.example.com/wp-json/tribe/events/v1/" />
    rel=htt://”?? Is this even valid? Should it be http? What is the purpose of this?

    Before the closing body tag:
    <script><script type='text/javascript'> /* <![CDATA[ */var tribe_l10n_datatables = {"aria":{"sort_ascending":": activate to sort column ascending","sort_descending":": activate to sort column descending"},"length_menu":"Show _MENU_ entries","empty_table":"No data available in table","info":"Showing _START_ to _END_ of _TOTAL_ entries","info_empty":"Showing 0 to 0 of 0 entries","info_filtered":"(filtered from _MAX_ total entries)","zero_records":"No matching records found","search":"Search:","pagination":{"all":"All","next":"Next","previous":"Previous"},"select":{"rows":{"0":"","_":": Selected %d rows","1":": Selected 1 row"}},"datepicker":{"dayNames":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"dayNamesShort":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"dayNamesMin":["S","M","T","W","T","F","S"],"monthNames":["January","February","March","April","May","June","July","August","September","October","November","December"],"monthNamesShort":["January","February","March","April","May","June","July","August","September","October","November","December"],"nextText":"Next","prevText":"Prev","currentText":"Today","closeText":"Done"}};/* ]]> */ </script>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author András Guseo

    (@aguseo)

    Hello @riseofweb and thanks for the kind words!

    Thanks for reporting this!

    Could you please share with me a url, where this is visible? That would be helpful in tacking down if this is a bug or not.

    Thanks and have a great weekend!
    Andras

    Thread Starter Daniel Chase

    (@riseofweb)

    @aguseo,

    Thank you for your response.

    The website is https://www.lightscalpel.com/
    The events plugin pages can be seen here: https://www.lightscalpel.com/events/

    It appears that this was already fixed in your latest update, or at least it is now saying https instead of htt:
    <link rel="htt://theeventscalendar.com" href="https://www.example.com/wp-json/tribe/events/v1/" />

    Plugin Author András Guseo

    (@aguseo)

    Thanks!
    Yes, the “https” khas been fixed sometime in the near past.

    On the <script> I will check with the team why it is done like that, if there is a specific reason.
    That part is used for the settings in the WordPress customizer, so that might be the need for <script>.

    Andras

    Plugin Author András Guseo

    (@aguseo)

    Hi @riseofweb

    I checked with the devs on that <script type="text/css"> and there is a reason why not <style> is used. (The reason is beyond my comprehension, sorry, I’m not a dev. 🙂 )

    Though this is not the most valid code, it still works as it should.

    Hope this clarifies.
    Let me know if you need any more help.
    Cheers,
    Andras

    Plugin Author Victor Zarranz

    (@vicskf)

    Hey there! This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. Please feel free to open a new thread if any other questions come up and we’d be happy to help. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Footer CSS on every page’ is closed to new replies.