Remove theme styles for one event?

This topic contains 2 replies, has 2 voices, and was last updated by  Michael Docker 7 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27212

    Is it possible to create a page for a particular event that doesn’t follow the overriding theme style? I want my site to host bookings for an event without my site’s branding.

    Michael Docker
    #27224

    Creating a template single-event-{event-slug}.php in your theme (replacing {event-slug} with the slug of the event should allow you to customise the page displayed for a single event. (You can use the example in templates/single-event.php as inspiration).

    That template file should be responsible for rendering the page, so in theory you can set the entire HTML markup of the page however you want. In practise you would typically use get_header() and get_footer() which include the theme’s header and footer, and which almost certainly contain things like menus and ‘brand’ image/text, along with loading stylesheets all associated with your theme.

    So you may find you have to reproduce your own header/footer – but you will still need to call wp_head() and wp_footer() appropriately in your template which themselves load theme/plugin styles. To get around any undesired effects that may have on the look of the page, you may just have to add further styling to over-ride the theme on that particular page.

    Your theme will hopefully insert classes into the <body> tag which would allow you to target an event with a specific ID or slug.

    Stephen Harris
    #27234

    Thank you for your prompt and detailed response. I’ll give that a go.

    Michael Docker
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.