single-event page architecture

Home Forums Calendar Products Events Calendar PRO single-event page architecture

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1609234
    carosch
    Participant

    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 ?
    Caroline

    #1610057
    Sky
    Keymaster

    Hi 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,
    Sky

    #1620607
    carosch
    Participant

    Hello,

    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

    #1620789
    Sky
    Keymaster

    Hi 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,
    Sky

    #1621297
    carosch
    Participant

    Hello,

    here is the snippi url
    http://snippi.com/s/58wklfu

    I try to insert the title in a h1 line 62

    Caroline

    #1621905
    Sky
    Keymaster

    Hi 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,
    Sky

    #1623133
    carosch
    Participant

    hello,

    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

    #1623319
    Sky
    Keymaster

    Hi 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,
    Sky

    #1628532
    carosch
    Participant

    Hello,

    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( '&laquo; ' . 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() ); ?>"> &laquo;&nbsp;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

    #1628541
    carosch
    Participant

    Hello,

    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

    #1629196
    Sky
    Keymaster

    Hi 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,
    Sky

    #1643813
    Support Droid
    Keymaster

    Hey 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

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘single-event page architecture’ is closed to new replies.