Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Atte Moisio

    (@moisture)

    WordPress uses a specific hierarchy for selecting which template get’s used. More details at https://developer.www.ads-software.com/themes/basics/template-hierarchy/

    In short, the child-theme should include a specifically named template, e.g. “page-events.php” where “events” would be the slug for the page.

    Thread Starter Peetey18

    (@peetey18)

    I appreciate the fast reply. Unfortunately, none of those solutions are working. I have tried creating a template file with all of the methods outlined in the API and I cannot get this to work. It still just pulls my default Archive.php and Single.php files.

    Plugin Author Atte Moisio

    (@moisture)

    Hmm, just tried this myself with the latest version of WordPress and it worked.

    Things to check:
    1. Child theme is selected under Appearance -> Themes
    2. I didn’t know this before, but looks like you can actually select the template to use when creating a page (under Page attributes -> Template), the templates provided by the child theme should be listed there.

    What are you using as the parent theme? There might be some issue with that too.

    Plugin Author Atte Moisio

    (@moisture)

    Also just realized you’re speaking about the single post templates, I’ll try that too.

    Plugin Author Atte Moisio

    (@moisture)

    The template for single event posts should be named “single-am_event.php”

    Thread Starter Peetey18

    (@peetey18)

    Thanks Atte. I actually just go it figures out as your replies came in. I needed to append “-am_event.php” to my theme files rather than the slug. “archive-am_event.php” and “single-am_event.php” worked. I changes the slug in the AM Events settings and was trYing to use that.

    Thread Starter Peetey18

    (@peetey18)

    Atte,

    Is it possible to do the same for a custom category layout? I.E. category-am_event-[category-slug].php.

    Plugin Author Atte Moisio

    (@moisture)

    Yes, should be possible. In WordPress terms the event category is a custom taxonomy named ‘am_event_categories’. Same goes for venues, it’s a custom taxonomy named ‘am_venues’.

    Looking at https://developer.www.ads-software.com/themes/template-files-section/taxonomy-templates/, the archive template should be named ‘taxonomy-am_event_categories.php’ or ‘taxonomy-am_event_categories-mycategory.php’

    I’m also planning to make the category and venue slugs configurable in the near future. Doesn’t affect the stuff above but just good to know maybe.

    Thread Starter Peetey18

    (@peetey18)

    Thanks Atte! Both options worked.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Create a custom page for Events’ is closed to new replies.