Home › Forums › Calendar Products › Events Calendar PRO › single-event page architecture
- This topic has 10 replies, 2 voices, and was last updated 5 years, 7 months ago by Sky.
-
AuthorPosts
-
August 29, 2018 at 2:17 pm #1609234caroschParticipant
Hello,
I need to display an event like in this design attached.
1) is for horizontal featured image
2) is for vertical featured image.How can I do this ?
I tried to override the single-event.php file, but I didn’t find the details I need.
Could you help me to succeed ?
CarolineAugust 30, 2018 at 12:17 pm #1610057SkyKeymasterHi there,
Thanks for reaching out! Please note that we are limited in how much support we can provide for customizations such as this. That being said, I will try to get you pointed in the right direction.
You can read about working with custom templates here: https://theeventscalendar.com/knowledgebase/themers-guide/. Basically, you copy the template you would like to modify from the plugin folder to a special directory within your child theme. Any modifications you make there will be used instead of the default template.
You can move the elements around in the template if you desire a different order, but this may likely also need some CSS to make it look good. If you are not familiar with PHP, HTML and CSS, you may have a hard time doing this yourself. In that case I would recommend hiring a developer to help with it.
I hope that helps! Please let me know if you have any additional questions about this.
Thanks,
SkySeptember 13, 2018 at 6:04 am #1620607caroschParticipantHello,
thank you for the answer
I try now to move the event title in the single event view.
I need a full-width title.
So I’m editing the single-event.php file from “views” directory.
and I have past<h1 class="wp-embed-heading tribe-events-list-event-title"> <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title_attribute() ?>" rel="bookmark"> <?php the_title() ?> </a> </h1>
just after that :
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
But nothing appeared in the single event page.
what am I doing wrong ?
Caroline
September 13, 2018 at 8:50 am #1620789SkyKeymasterHi again,
It’s hard to say what’s going on without seeing your code in context. Could you paste your complete single-event.php file into a code sharing site like http://snippi.com/ and share the link with me here?
Can you also tell me exactly where you put this modified file within your child-theme?
Thanks,
SkySeptember 13, 2018 at 12:54 pm #1621297caroschParticipantHello,
here is the snippi url
http://snippi.com/s/58wklfuI try to insert the title in a h1 line 62
Caroline
September 14, 2018 at 7:50 am #1621905SkyKeymasterHi again,
I tried your template, and it is working for me.
Make sure you are putting this in [your-theme]/tribe-events/single-event.php
You should see the event title twice on a single events page with that code.
Hope that helps!
Thanks,
SkySeptember 16, 2018 at 10:39 pm #1623133caroschParticipanthello,
single-event.php is in the right place.
I already succeed to customize related-event.php at the same place and some other stuff in the module (and) meta directories.But this one, I think is not overriding anything.
I try to add brut text, but nothing appears.
How can I force to override this file ?
Caroline
September 17, 2018 at 7:17 am #1623319SkyKeymasterHi again,
Not sure what you’re doing wrong. Here is a screenshot of the single page with your custom template. I changed the title content to “Here is my custom heading” so you can see that it showing.
Just place your copy of single-event.php in [your-theme]/tribe-events/ folder and it will override the default template.
Thanks,
SkySeptember 23, 2018 at 3:58 am #1628532caroschParticipantHello,
sorry the overriding doesn’t work.
I also try to change the back link label like that :
<p class="tribe-events-back"> <!--<a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> <?php printf( '« ' . esc_html_x( 'All %s', '%s Events plural label', 'the-events-calendar' ), $events_label_plural ); ?></a> --> <a href="<?php echo esc_url( tribe_get_events_link() ); ?>"> « Retour à la liste des événements</a> </p>
but nothing happens.
I still have “<< Tous les évènements.And the problem with this sentence, is that I can’t find where to correct the french way to write événement (note the orientation of the second accent).
I change all the translation in the two .po files (the events calendar & the events calendar pro) but that does not change anything.
Il have also the label well written in the display settings but the plugin does not respect the label or the po file (I’v forced to override the %s reference, but putting the word instead).So I have two problems:
– my child file single-event.php does not override the plugin file
– the plural label in the display settings does not work (évènements is still there instead of the good one évènements).Any idea of what happens ?
I need to publish the website tomorrow, it’s about french littérature, so, I need to correct all words.
Caroline
September 23, 2018 at 5:15 am #1628541caroschParticipantHello,
I use Enfold as parent theme.
Please let me know how to not use the Enfold overring.I found a single-event.php in wp-content/themes/enfold/config-events-calendar/ directory.
And that is the file that the wordpress use instead of my child-theme/tribe-events/singel-event.php
I need help for tomorrow, please.
Caroline
September 24, 2018 at 8:54 am #1629196SkyKeymasterHi again,
I double checked that a child theme template should override the template in the parent theme. It is working as expected with the Twenty Seventeen theme. I do not have access to Enfold, but this should be handled in all themes the same way.
If the override is not working, it is likely that you are not putting the file in the correct place. I don’t know of any other reason why it wouldn’t work.
Please note that we are limited in the amount of support we can provide for customizations. I can only direct you to the process for overriding the templates from within your theme or child theme. If you are unable to get that working from our instructions, you may need to have a developer take a look at what you’re doing for further assistance.
For the translation issue, I can suggest a few things. First, check out these articles that describes how to create custom translation files: https://theeventscalendar.com/knowledgebase/how-to-override-plugin-language-file
and https://theeventscalendar.com/knowledgebase/translating-the-events-calendar/If you think the translation for plural “events” is not right, please feel free to submit a correction.
Additionally, if you’d like to override “events” everywhere it is used, there are two filters you can use: “tribe_event_label_plural” and “tribe_event_label_plural_lowercase”.
You can do something like the following:
add_filter('tribe_event_label_plural', 'my_custom_events_label_plural');
function my_custom_events_label_plural($label) {
return 'my custom labels';
}
Hope that helps. Please let me know if you have more questions about this.
Thanks,
SkyOctober 16, 2018 at 9:35 am #1643813Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘single-event page architecture’ is closed to new replies.