Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi,

    The main template for the submission form is this one:
    /events-manager/templates/forms/event-editor.php

    But there’s also an additional template for the categories select here:
    /events-manager/templates/forms/event/categories-public.php

    This tutorial explains how to create custom templates that are upgrade-safe:
    https://wp-events-plugin.com/documentation/using-template-files/

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Thanks, but I can’t code :s
    I was looking at the correct file, categories-public.php, but just cant work out how to change it. I found the multi select section, but could only find talk on here of making it in to a drop down.

    If any other readers here can help out that would be a big help!

    Thank you

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Can anyone be kind enough to help here?

    It is causing a big issue, as I cant rely on users to upload an event image, therefore depending on the category selected I am pulling in a backup image. If it is multi select the conditional formatting goes whacky and pulls in two images putting formatting all over the place.

    What conditional formatting are you using?

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Hi

    I am using

    <ul style="float: left; width: 200px; padding: 10px; background: #fff; border: 1px solid #ddd; box-shadow: 0 0 5px #ddd; box-sizing: border-box; margin: 10px 10px 10px 10px;">
    {has_image}#_EVENTIMAGE{200,200}{/has_image}
    {no_image}{has_category_meetforadrive}<img class="thumb1">{/has_category_meetforadrive}{/no_image}
    {no_image}{has_category_trackoractivityday}<img class="thumb2">{/has_category_trackoractivityday}{/no_image}
    {no_image}{has_category_showormeet}<img class="thumb2">{/has_category_showormeet}{/no_image}<br>#_EVENTLINK<br>
    #_EVENTDATES<br>
    #_LOCATIONNAME<br>
    #_LOCATIONTOWN<br>
    #_LOCATIONCOUNTRY<br>
    </ul>

    Spot the obvious problem event in action here: https://carshow.life/events/
    I selected two event categories and didn’t upload any event image, so it gets caught by two of the conditions and shows two of my backup photos, instead of one.

    Thanks!

    Event images are the same as normal WordPress Featured Images, so it might be easier to use something like this:

    https://www.ads-software.com/plugins/default-featured-image/

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Thanks, that will only give me one image though by the looks of it. I was hoping to have a back up one for each of my categories, just to stop the list of events potentially looking bland with the same image over and over.

    In that case you’d need to use more complex code in order to avoid the double image problem you mentioned. Because this isn’t something that can be done with placeholders on their own, you’d probably need to use PHP to make a custom conditional placeholder.

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Ok, thanks. I’ll need to get a developer to help there. Will it not be eaiser for them to change the categories-public.php file so it is only single select from the outset?

    Yes, because that solution only involves removing one word ??

    If all you want to do is make the dropdown a single choice, rather than make it a radio select, etc., just remove the word multiple on line 14, leaving everything else the same.

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Oh dear. Well that was embarrassingly easy.
    I had tried to play a bit with the file, but I was drawn to the line a few down and was trying to see what I could do with that, bt with no joy
    $walker = new EM_Walker_CategoryMultiselect();

    Thank you for sharing how to change this!

    For some reason the list now has some grey just inside the greyed out scroll bar against the middle two options. Nothing that can’t be lived with, but it seems a peculiar side effect of removing the ‘multiple’ from the code.

    Can you post a link? It might be something that be can fixed with a bit of CSS styling.

    Thread Starter zzkamikazezz

    (@zzkamikazezz)

    Hi

    I can’t really as you need to be registered/logged in. It looks better at home on up to date safari and chrome (rather than version 40 of chrome at work). It is the selection box itself, so something not stylable I think.

    This is what it looks like on an up to date browser, nothing too bad at all really:
    https://postimg.org/image/yjc7cn74x/

    Thanks for offering to help, if there is something that can be tweaked, great. If not, no worries!

    Hard to tell without a live link, but it looks like that could be just how Safari renders that type of select box.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Event categories – making them single select’ is closed to new replies.