Ed
(@erishel)
Good afternoon @ma3ry,
No problem, I’d love to help you out with that!
First, let’s revert the changes that were made to your single-events.php template file by adding the code that was removed if you haven’t already. If you don’t have any other customizations in this file, you could also just overwrite with a new copy.
- Make a copy of the meta.php file (located in /plugins/the-events-calendar/views/modules)
- Make a new folder in your theme directory called tribe-events
- Make a new folder in that one called modules
- Drop the copied file in that folder
Now, open the meta.php that you copied to the tribe-events directory, open it and look for the following line:
tribe_get_template_part( 'modules/meta/details' );
Rather than removing this line, let’s comment it in case you want to revert the changes. It should look like this:
#Remove details meta
#tribe_get_template_part( 'modules/meta/details' );
Let us know if that works for you, cheers!
Ed
-
This reply was modified 8 years, 3 months ago by
Ed.
Thread Starter
ma3ry
(@ma3ry)
Thank you. That got rid of it on the single page but it is still appearing at the bottom of the List View.
Would appreciate it if we could get rid of it there too please.
Thank you.
Ed
(@erishel)
Hi again @ma3ry,
The template files for list view can be found in plugins/the-events-calendar/src/views/list/single-event.php. To customize the template, a copy of the file will need to be copied over to your theme directory, keeping the directory structure like the others.
In that file, you’ll notice that there is a comment indicating Event Meta. Under that will be comments for each of the meta details. If you would want to remove schedule details, you can comment the lines under <!– Schedule & Recurrence Details –> up until the next comment for the next section.
Hope that helps!
Have an awesome day,
Ed
Thread Starter
ma3ry
(@ma3ry)
Thank you Ed but I don’t have that section you mention. I am using v4.6.3 which I believe is the most recent but cannot find the word “Recurrence” in the single-event.php file. The word “Schedule” is found only in this code:
<div class="tribe-events-schedule tribe-clearfix">
<?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>
<?php if ( tribe_get_cost() ) : ?>
<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
<?php endif; ?>
</div>
I removed the above code from the file and tried it but it didn’t change anything.
Ed
(@erishel)
Here’s the code:
<!-- Event Meta -->
<?php do_action( 'tribe_events_before_the_meta' ) ?>
<div class="tribe-events-event-meta">
<div class="author <?php echo esc_attr( $has_venue_address ); ?>">
<!-- Schedule & Recurrence Details -->
<div class="tribe-event-schedule-details">
<?php echo tribe_events_event_schedule_details() ?>
</div>
<?php if ( $venue_details ) : ?>
<!-- Venue Display Info -->
<div class="tribe-events-venue-details">
<?php
$address_delimiter = empty( $venue_address ) ? ' ' : ', ';
// These details are already escaped in various ways earlier in the process.
echo implode( $address_delimiter, $venue_details );
if ( tribe_show_google_map_link() ) {
echo tribe_get_map_link_html();
}
?>
</div> <!-- .tribe-events-venue-details -->
<?php endif; ?>
File is found in plugins/the-events-calendar/src/views/list/single-event.php make sure you’re not in src/ make sure you aren’t in plugins/the-events-calendar/src/views/single-event.php
Thread Starter
ma3ry
(@ma3ry)
Sorry but I am now totally confused. You say:
make sure you’re not in src/ make sure you aren’t in plugins/the-events-calendar/src/views/single-event.php
Where exactly am I supposed to be? What code do I remove?
I tried removing all of the code you included above and it broke the page. Could you please give me instructions from start to finish so it’s not so confusing. Thank you.
Ed
(@erishel)
Those two paths are different, look closely.
Thread Starter
ma3ry
(@ma3ry)
Yes I see that the first one has /list/ and the second one doesn’t, but they both have /src and you are saying to make sure I am not in src/
Ed
(@erishel)
Sorry, that wording is confusing.
plugins/the-events-calendar/src/views/list/single-event.php
Is where you want to be.
My apologies!
Ed
(@erishel)
Sorry, that wording is confusing.
You will have to be in src, that was a typo. Please follow the file path.
Thread Starter
ma3ry
(@ma3ry)
I created file path in the child theme to single-event.php, double checked spelling and order of folders.
See screenshot https://prnt.sc/j59hdd
I removed code as shown above and this is what remains
Screenshot https://prnt.sc/j59i6z
I dumped WP-Rocket cache and browser cache and tried a couple of different browsers
My page at https://christiangays.com/events/list/ still shows current month, date and time, Find out more >> and +EXPORT EVENTS
See screenshot https://prnt.sc/j59ioi
I’m sorry. I just don’t know what I’m doing wrong.
Ed
(@erishel)
No worries, I wasn’t as concise as I could have been. The paths look close, the one path I was showing where the files would come from that exist in the-events-calendar folder.
After complete the directory structure will look like: generatepress_child/tribe-events/src/views/list/
I think that some wires got crossed on the file paths. So inside your theme folder should be tribe-events → src → views → list → then the template you are working with.
Thread Starter
ma3ry
(@ma3ry)
Thank you for your patience with me. I have changed the path as per screenshot https://prnt.sc/j5bgsl
Meta data is still at the bottom of the page. https://christiangays.com/events/list/
Ed
(@erishel)
Ok, if templates are correct, the only other place the data could be would be: the-events-calendar/src/views/modules/ — probably details.php
In the screenshot you sent, it looks like all of those folders are added to the themes directory. tribe-events should be in your theme folder, src should be in tribe-events and so on…
-
This reply was modified 8 years, 2 months ago by
Ed.
Thread Starter
ma3ry
(@ma3ry)
Thank you. I haven’t been able to fix it so have asked my theme guys for help. Will post back here if I can find a solution. Am thinking that instead of trying to change the template files, perhaps trying some custom CSS. I haven’t been able to do it but perhaps they can give me some ideas.