• mike

    (@gopic2011)


    I have tried to override format which is used inside templates and tried to created the path like this

    wp-content\themes\xxxx\plugin-templates\events-manager\templates\formats\event_list_item_format.php but this path is not working i am using free version

Viewing 1 replies (of 1 total)
  • joneiseman

    (@joneiseman)

    The documentation on this is here: https://wp-events-plugin.com/documentation/using-template-files/

    You can place the template overrides in one of the following locations:

    • wp-content/plugin-templates/events-manager
    • wp-content/themes/parent-theme/plugins/events-manager
    • wp-content/themes/child-theme/plugins/events-manager

    In your example event_list_item_format.php would be copied to any one of the following directories:

    • wp-content/plugin-templates/events-manager/formats
    • wp-content/themes/parent-theme/plugins/events-manager/formats
    • wp-content/themes/child-theme/plugins/events-manager/formats

    Read the wp-content\plugins\events-manager\templates\formats\readme.txt file to see how to override the files in this directory. For the override of event_list_item_format.php you would need to add the following code snippet:

    function my_em_custom_formats( $array ){
        $my_formats = array('dbem_event_list_item_format'); //the format you want to override, corresponding to file above.
        return $array + $my_formats; //return the default array and your formats.
    }
    add_filter('em_formats_filter', 'my_em_custom_formats', 1, 1);
    

    You can use the Code Snippets plugin to add the above code snippet.

Viewing 1 replies (of 1 total)
  • The topic ‘template override’ is closed to new replies.