Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11148
    rheja
    Participant

    Hello,

    Thank you for this nice plugin. I am really happy that it is working with polylang.

    I have one question.

    When I set the setting enable to use default templates the layout of the event is horrible. You can see it overhere: single event

    The event is above my sidebar and that is not what I want. When I switch the setting enable to use default templates OFF.. the event is next to the sidebar what is great but it is missing all the details like event date, event time, google maps, etc.

    I did understand to copy the event template files to my theme folder but nothing is changing .

    Can you tell me what files I have to edit to get the event fit next to the sidebar?

    That would be really awesome!

    jap

    #11218
    rheja
    Participant

    Would be really nice if someone can give me an advice how to change the templates.

    #12116
    codemonkeys
    Participant

    One method is doing it through your theme’s functions.php file like this:

    
    // REMOVE TEMPLATE ACTIONS
    function df_add_and_remove_actions() {
    	remove_action('em_before_main_content', 'em_breadcrumb', 20);
    	remove_action('em_get_sidebar', 'em_get_sidebar', 10);
    	remove_action('em_before_single_event_title', 'em_display_event_categories', 10);
    	remove_action('em_after_single_event_title', 'em_display_single_event_meta', 10);
    	remove_action('em_after_single_event_title', 'em_display_single_event_google_map', 40);
    	remove_action('em_after_single_event_title', 'em_display_event_tickets', 50);
    	remove_action('em_after_single_event', 'em_display_ical_button', 10);
    	remove_action('em_after_single_event', 'em_display_event_tags', 20);
    }
    add_action('wp' , 'df_add_and_remove_actions');
    
    // Do something in a template action
    function df_display_something() {
    	echo 'When: ';
    }
    //add_action('em_after_single_event_title', 'df_display_something', 10);
    
    // ADD TEMPLATE ACTIONS
    add_action('em_after_single_event_title', 'em_display_single_event_meta', 20);
    add_action('em_single_event_content', 'em_display_ical_button', 20);
    add_action('em_single_event_content', 'em_display_single_event_google_map', 40);
    

    Another way is to copy the template files to your theme and edit them, an example would be copying
    /templates/content-single-event.php & /templates/single-event.php
    to your theme’s directory. Be sure to copy them both as they rely on each other. Then you can edit them without worrying about it being overwritten if the plugin ever updates. Not sure if that’s much of a concern though as I’m starting to suspect this plugin doesn’t get much attention anymore.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.