Support » Plugin: WooCommerce Event Manager » Display attendees list

  • Resolved sebastiansuciu

    (@sebastiansuciu)


    Hello,

    I have followed your instructions about how you can create your own template and I finally got a workaround here but I still need few things.

    1. Before I have bought this plugin, in the documentation said that you can display the attendees list and I can’t figure out how could I, there is not shortcode only in backend I can watch it or export it as CSV but no display mode.

    2. I want to be able to do the same thing with filter and hooks like with the templates, to be able to edit as I like, in the child theme (to not lose anything on update).

    3. How can I translate in my own language anything? I am using Loco Translate but I can’t translate anything as you can see on the registration form.

    P.S. I have bought the pro version of the plugin.

    Thank you,
    Sebastian.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • HI, just wondering,

    how did you managed to display the attendees list ya? Because i kinda need it too, but not answer displayed here.

    Btw you had a really beautiful website

    add_shortcode( 'list-attendee', 'ebig_post_listing_parameters_shortcode' );
    function ebig_post_listing_parameters_shortcode( $atts ) {
        ob_start();
     
        // define attributes and their defaults
        extract( shortcode_atts( array (
            'type' => 'mep_events_attendees',
            'order' => 'date',
            'orderby' => 'title',
            'posts' => -1,
            'tip' => '',
        ), $atts ) );
     
        // define query parameters based on attributes
        $options = array(
            'post_type' => $type,
            'posts_per_page' => -1,
            'paged' => $paged,        
        );
    
        // set the "paged" parameter (use 'page' if the query is on a static front page)
        $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    
        if ($tip != "") {
            $options['meta_query'] = array(
                array(
                    'key' => 'ea_ticket_type',
                    'value' => $tip,
                ),
            );
        }
        
        $query = new WP_Query( $options );
        // run the loop based on the query
        if ( $query->have_posts() ) {
            ?>
            <div class="attendeelist">
                <table class="attendee-listing">
                    <tbody>
                        <tr>
                        <td style="text-align: center;"><span style="font-weight: 400;">Nume</span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;">Prenume</span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;">Oraș</span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;">Club</span></td>
                        </tr>
                        <?php
                while( $query->have_posts() ) {
                    $query->the_post();
                    
                    $attendee_meta = get_post_custom(get_the_ID());
                    // print_r($attendee_meta);
                    ?>
                        <tr>
                        <td style="text-align: center;"><span style="font-weight: 400;"><?php echo $attendee_meta['ea_nume'][0]; ?></span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;"><?php echo $attendee_meta['ea_prenume'][0]; ?></span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;"><?php echo $attendee_meta['ea_oras'][0]; ?></span></td>
                        <td style="text-align: center;"><span style="font-weight: 400;"><?php echo $attendee_meta['ea_club'][0]; ?></span></td>
                        </tr>
                <?php 
                }
               
                // <nav class="pagination">
                // <?php pagination_bar( $query );
                // </nav> 
         
                ?>
                </tbody>
                    </table>
            </div> <?php
        } else {
            ?>
            <h6 style="color: #004693;">Momentan nu este niciun alergător la această cursă. Fii tu primul!</h6>
            <?php
        }
        
    
        wp_reset_postdata();
        $myvariable = ob_get_clean();
            return $myvariable;
    }
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.