Viewing 13 replies - 1 through 13 (of 13 total)
  • In Events > Settings > Formatting > Locations you can create any layout and content you want. Default layout is (just like with the events) pre-filled, but you can completely customize it to your own needs.

    The Locations Page (to list all your locations) is generated by your theme’s own archive.php. To change the layout for that, your will need to edit the template. Take a look here: https://codex.wordpress.org/Creating_an_Archive_Index πŸ˜‰

    Thread Starter Radek Jurzysta

    (@shch00r)

    Yeah I know about that, thanks πŸ™‚
    I’m using Divi and it would be way easier for me to just link to a custom page that I can easily manage, as it’s content may be often customised.

    In that case, you’d best create an archive-locations.php in your theme, controlling the general layout (header, menu, sidebar, etc). Perhaps copy that from your existing page template? Then point to that in your edit post screen.

    In your Pages, you have a page Locations, right? A sub page of Events, most likely. You can use that as well – just like for Events Calendar.

    By default EM will override anything in that page. A little work-around for that is adding this at the bottom of your page.
    <div style="visibility: hidden;">CONTENTS</div>

    The “problem” with that is, though, that it will become a static page, so if you edit/add a location, those changes will not be processed on the locations page (anymore).
    TO solve that, you’d need to use the shortcodes listed on https://wp-events-plugin.com/documentation/shortcodes/

    Thread Starter Radek Jurzysta

    (@shch00r)

    The shortcodes are actually what I’m using to achieve the desired result πŸ™‚ But I’m having an issue with upcoming events list (it’s in another topic).

    If you use “open” shortcodes, you can put your styling in between:
    [locations_list] YOUR MARKUP HERE [/locations_list]
    Note: the markup will be applied per location. Which is logical, as the Locations Page is meant to be an overview of all your locations.

    In only [locations_list] the content will be auto-generated.

    Does that help?

    I use that myself to display the events in a different way/lay-out on the main page than in the sidebar widget.

    Thread Starter Radek Jurzysta

    (@shch00r)

    Temporarily, I just used the autogenerated list with some custom content: https://dumdum.eu/strefa/szkolenia/lokalizacje/

    It’s not perfect but does the job for now. Thanks for your help!

    Thread Starter Radek Jurzysta

    (@shch00r)

    Said all the above, it would be nice-to-have feature to just set a custom static page as your locations root, and just leave it up the the user to fill in the content.

    Uhm…? You can already set the content, so I’m not sure what you mean. You could always point EM to an auto-page (for internal linking, I guess) and then redirect that in .htaccess to your static page.
    But again, that would also work with
    <div style="visibility: hidden;">CONTENTS</div>

    Just for my own curiosity:
    Could you provide the static HTML mark-up of how you do want it to look, please? With all the possibilities EM offers, I’m sure that is will be possible. Maybe just hard(er) to understand your wishes on a medium like this πŸ˜€

    Thread Starter Radek Jurzysta

    (@shch00r)

    I don’t have a definite design yet, But depending on my customer needs, I will be using some of the Divi modules. Hence the whole thread about customising the whole page.

    Again, just create a page with divi, then manually add the div to prevent EM from overwriting it

    Thread Starter Radek Jurzysta

    (@shch00r)

    Will give it a try, thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Custom locations page’ is closed to new replies.