Modern Tribe’s Events Calendar and loop-grid modification

Modern Tribe offers an interesting plugin called Events Calendar (WordPress).

Although it is mainly hassle-free, some problems may occur when integrating the plugin to a multilingual website (or in conjunction with the Polylang or qTranslate plugins).

Hence, working on a website creation project for a French-language kindergarten, I realized that when the calendar page was consulted for the first time, the days appeared in English at the top of the calendar grid, even though the WordPress site was in French and Polylang was activated as French by default. When the user consulted the previous or next month, everything would then appear in French, as required.

So, here’s one way to avoid such a bug: by removing the day row from the grid loop.

You need to edit this file: wp-content/plugins/the-events-calendar/views/month/loop-grid.php (through FTP or in your cPanel)…

Then, replace this line:

<th id=”tribe-events-<?php echo strtolower( $day ) ?>” title=”<?php echo $day ?>” data-day-abbr=”<?php echo $wp_locale->get_weekday_abbrev( $day ); ?>”><?php echo $day ?></th>

by the following line:

<th id=”tribe-events-<?php echo strtolower( $day ) ?>” title=”<?php echo substr($day, 0, 0); ?>” data-day-abbr=”<?php echo $wp_locale->get_weekday_abbrev( $day ); ?>”><?php echo $day ?></th>

If you would prefer to abbreviate the days in the grid (i.e.: Wed instead of Wednesday), you can do so by replacing $day, 0, 0 by $day, 0, 3. 

The last digit, 3, means three letters; if you would prefer a single letter for the day, then you would modify it to $day, 0,1.

Best regards.

Advertisements

Payout and Payment Methods of Popular Online Advertising Platforms


Adsense

Minimum payout: $100.00.
Payment mode: check, secured express delivery or electronic funds transfer.


Adversal

Minimum payout: $20.00.
Payment mode: ACH, PayPal, check or wire.


Amazon Associates

Model: commission via item selling links.
Minimum payout and mode: Amazon gift certificate / direct deposit ($10.00) or check ($100.00).


BuySellAds

Model: ad space selling.


Chitika

Minimum payout and mode: PayPal ($10.00) or check ($50.00).


RevenueHits

Minimum payout: $50.00.
Payment mode: Paypal, Payoneer or wire.


Qadabra

Model: performance based advertisement network.
Minimum payout and mode: Paypal ($1.00), Payoneer ($20.00) or wire ($500.00).