Home › Forums › Calendar Products › Events Calendar PRO › Where to put This_Week.php in Child Theme?
- This topic has 5 replies, 4 voices, and was last updated 9 years, 9 months ago by
Christopher.
-
AuthorPosts
-
June 3, 2016 at 12:11 am #1122060
Christopher
ParticipantHello!
I had to do some modification in This_Week.php (../wp-content/plugins/events-calendar-pro/src/Tribe/This_Week.php) in order to change the output of date and time in this-week-widget.
But I can’t find a effective place, where to put it in my child theme, though having studied the Themer’s Guide.
Maybe you can give me a hint.
Thanks in advance!
Christopher
June 3, 2016 at 6:17 am #1122122Cliff
MemberHi Christopher.
Thanks for your question.
If you’re trying to customize the This Week widget, you’re modifying the wrong file.
For the files that can be overridden via the Themer’s Guide (the templating system), they have a comment in the top of the file.
For example: /wp-content/plugins/events-calendar-pro/src/views/pro/widgets/this-week/single-event.php says “Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/widgets/this-week/single-event.php”
Please let me know if this solves your issue.
June 3, 2016 at 8:43 am #1122196Christopher
ParticipantHello Cliff!
Thanks for your reply!
The point is, that I copied all files as indicated in the Themer’s Guide to a folder in my child theme, regarding the widget. But: The output of the format of the date in the header of the widget can’t be controlled in the templates you refer to, in this case loop-grid-day.php, where I find the code:
<div class=”tribe-this-week-widget-header-date”>
<span class=”day”><?php echo esc_html( $day[‘formatted_day’] ); ?></span>
<span class=”date”><?php echo esc_html( $day[‘formatted_date’] ); ?></span>
</div>My trials to change the date format here failed. But I found out, I could change them in the mentioned This_Week.php.
Or do I miss something?
Or may I conclude from your response, that there is no smooth way to change the time format in the widget via modifying this file in the folder of my child theme?
Christopher
June 6, 2016 at 9:07 am #1123048Cliff
MemberSince the file you’re trying to modify is not part of our templating system, you’d need to resort to typical PHP classes (e.g. extending the class). If you don’t know how to do this, you’ll either need to stay within the confines of customizing within our templating system or get help from a developer.
I believe you should be able to do everything you need in the templating system, though.
If needed, feel free to reference our list of known customizers.
June 21, 2016 at 9:35 am #1129914Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Where to put This_Week.php in Child Theme?’ is closed to new replies.
