How Can You Have Multiple Single or Event View Templates for Different Events

Home Forums Calendar Products Events Calendar PRO How Can You Have Multiple Single or Event View Templates for Different Events

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #968102
    Lauren
    Participant

    How can I have/use multiple unique single templates for specific events or categories?

    For example, I want to use a unique (different layout, full width with no sidebar) single event template for a conference category/event but everything else a default single template (2 columns, sidebar) or the single-event.php in /tribe-events/single-event.php.

    I can’t find this anywhere in the document or search. Let me know. Thanks.

    #968177
    Lauren
    Participant

    I still need assistance on this.

    #968311
    Brian
    Member

    Hi,

    Sorry for the delay on this.

    I can help you out.

    How can I have/use multiple unique single templates for specific events or categories? For example, I want to use a unique (different layout, full width with no sidebar) single event template for a conference category/event but everything else a default single template (2 columns, sidebar) or the single-event.php in /tribe-events/single-event.php.

    Since we only have the one template for single-events you would have to use conditional statements on that template to modify the content layout based on what you would like to do.

    Here is all of WordPress’s conditionals:

    https://codex.wordpress.org/Conditional_Tags

    And here is ours:

    https://gist.github.com/jo-snips/2415009

    Let me know if you have any follow up questions.

    Thanks

    Please note per our terms and conditions we may take up to 24 hours to respond on weekdays to your posts. We try to get that earlier, but not all the time.

    #968856
    Lauren
    Participant

    Thanks. So there isn’t a way to create a separate template like single-event-books.php for example to pick up all Books category for example?

    #968862
    Brian
    Member

    Hi,

    So there isn’t a way to create a separate template like single-event-books.php for example to pick up all Books category for example?

    Unfortunately, no, but that is an interesting idea and I could see how that would be useful.

    If you would like to request that feature please head to our UserVoice Page and add your own or upvote that feature as they will increase the chances of it being added to a future version.

    http://tribe.uservoice.com/forums/195723-feature-ideas

    Thanks

    #968874
    Lauren
    Participant

    Looks like the function I was looking for was tribe_event_in_category().

    #968921
    Brian
    Member

    Ok glad you found that function.

    #984304
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How Can You Have Multiple Single or Event View Templates for Different Events’ is closed to new replies.