Help Desk

Format Attendees List with separators

  • Posts: 10 Topics: 11
    | Permalink

    Hi!

    We’re trying to edit the file:
    /wp-content/plugins/event-tickets-plus/src/views/attendees-list.php

    We have names displayed, but there’s no good separator. It’s just the names with a space between each member name…and looks to run-on a bit…and is challenging to read.

    We’re using CSS, but the ” , ” is added to the last name in the list and doesn’t look 100% clean.
    .tribe-custom-attendee-name::after {content: ” , “;}

    Any ideas/options?

    Posts: 5023
    | Permalink

    Hi Chip,

    Thanks for reaching out!

    Are you using this code to add the attendee names to the list? You could add the comma (or other separator) directly in the template:

    <?php echo $attendee_name . ','; ?>

    Are you displaying the avatars as well, or just the names? We are a bit limited in the amount of support that we can provide customizations like this, but if you want to send me the code that you’re using (preferably as a gist) and let me know how you’d ideally like to separate the names, I’ll be happy to take a look and see what I can recommend!

    Thanks,

    Jennifer

    Posts: 10 Topics: 11
    | Permalink

    Isn’t that php code the same as our css? It will still put comma after last name.

    We’re just adding name to list of attendees…no avatar

    Posts: 5023
    | Permalink

    Hi Chip,

    Yes that does add the comma similarly to your CSS, but I was really intending to show a starting point for where you could add additional markup. You could also add some CSS to display the li as a block level element (display: block;) for example, it really depends on what type of separation you would like to add.

    As I mentioned previously, we are limited in the support that we can provide for customizations like this, but if you can tell me exactly how you would like it to display, I’ll be happy to try to point you in the right direction!

    Thanks,

    Jennifer

    Posts: 10 Topics: 11
    | Permalink

    Hi Jennifer,
    Yes, we’re only trying to show attendee names, nothing else…but in a clean format.
    So far, we are separating with comma, but that puts a comma after the last name too.

    Current CSS is already assigning block attribute:

    .tribe-attendees-list-item {
    display: block;

    Posts: 5023
    | Permalink

    Hi Chip,

    It sounds like you’re on the right track with what you’ve already added. Can you please send me a link to an event with some attendees so that I can see what you’re referring to? Styling from your theme can affect the list as well.

    Thanks,

    Jennifer

    Posts: 10 Topics: 11
    | Permalink

    see attached…thank you!

    Posts: 5023
    | Permalink

    Hi Chip,

    Thanks for sending the screenshot! Without a link to the page, it’s a bit harder to recommend anything specific, but here are a few things that you can try out:

    • Using :not(:last-child) in your CSS to avoid adding a comma to the last name in the list
    • Adding !important to the “display: block” rule for the list items
    • Adding/increasing the margins/padding around the list items
    • Displaying the names in equal-width columns

    As I mentioned previously, we are limited in the amount of support that we can provide for CSS customizations like this, but if you get stuck, please send me a link to a page with your CSS applied – I’ll be happy to take a look and point you in the right direction!

    Posts: 10 Topics: 11
    | Permalink
    This reply has been marked as private.
    Posts: 5023
    | Permalink
    This reply has been marked as private.
    Posts: 65
    | Permalink

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

    | Permalink

The topic ‘Format Attendees List with separators’ is closed to new replies.