Hi,
I’m trying to customize my event listing templates, but when I copy the template files (archive-event.php and eo-loop-events.php) to my plugin folder, the CSS seems to get all messed up, even if I don’t change anything in the templates themselves.
Example: http://metrowestfho.ca/events/event/on/2017/12/08/
What am I doing wrong?
Edward Weiss
Does it have something to do with where in the theme folder I place the files?
-
This reply was modified 6 years, 11 months ago by Edward Weiss.
Edward Weiss
I fixed it by using the theme template as the base and then just plugging in the event loop.
Edward Weiss
Hi Edward,
In case anyone comes across this, depending on your settings (I.e. if theme integration is enabled – and it is by default) then archive-event.php is not used unless it is present in the theme.
By default the plugin will use the theme’s page (page.php) and insert the content (list of events) using partial templates, such as eo-loop-events.php. For the single event page it uses single.php.
Copying and editing only the partial template might suffice. For more structural changes you can create templates (archive-event.php, single-event.php, taxonomy-event-category.php etc) but you will need to design these to match your theme. Working from an existing theme template is a good idea.
Stephen Harris