best way to show events like attached


Hi, I wanted to know what you thought would be the best way to do the attached page. I've looked at some events plugins briefly (including yours) but I'm looking for something a bit different. Meaning I don't need something where the user needs to click on each event or have registation or payment or anything like that. I just need the list functionality and those buttons where the user can print. add to cal, or share (you can ignore the subscribe). Do you know of a plugin or easy way to do this? I was even thinking of having them as a custom blog post type and just have this page be a feed of that specific category, but I'm not sure how I would integrate the book on cal aspect. Do you have any ideas or suggestions?

  • Rupok
    • Support Ninja

    Hi Jonathan,

    I don't need something where the user needs to click on each event or have registration or payment or anything like that. I just need the list functionality and those buttons where the user can print. add to cal, or share (you can ignore the subscribe)

    I believe, this is possible with our Events+ plugin in addition to Print Friendly plugin and with some shortcode supported Sharing plugin like AddToAny.

    So after activating all these, you should go to your "/wp-content/plugins/events-and-bookings/default-templates/default/" directory and copy the "archive-incsub_event.php" file to your "/wp-content/themes/your_current_theme_directory/". Then you can edit that file to accommodate the share and print button with shortcode in the loop of the events listing template. You can also use custom CSS code to match the listing design with your target. For rendering shortcode in the template, you can check this official documentation: https://developer.wordpress.org/reference/functions/do_shortcode/

    And to get the add to cal features in the events listing page, please go to "Dashboard > Events > Settings > Addons" section and activate "Export: Google Calendar" and "Export: iCal" addons. These will provide the "Add to Calendar" feature on events listing page for each events.

    I believe, in this way, you can achieve what you are looking for.

    Please let us know if you have any confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Nithin
    • Support Wizard

    Hi Jonathan,

    Hope you are doing good today. :slight_smile:

    I checked the code, I'm afraid, the easiest method would be to make use of template as mentioned above, ie in your theme folder, so that you can add the buttons the way you want. Once done, this would require some custom CSS, so that it would fit to your requirements.

    As mentioned above, you just have to place the button codes on these templates, and according to how they appear, you could customize it with CSS.

    For eg: The PDF plugin mentioned above, comes with a code that you could add in the template, ie:
    <?php if(function_exists('pf_show_link')){echo pf_show_link();} ?>

    I have created a sample template, based on these two plugins mentioned by Rupok. You can create a template archive-incsub_event.php in your theme folder, and copy the below code. However, it would require custom CSS to style it according to your website.

    <?php
    global $booking, $wpdb, $wp_query;
    get_header( 'event' );
    ?>
    	<div id="primary">
    		<div id="content" role="main">
                <div id="wpmudevevents-wrapper">
                    <h2><?php _e('Events', Eab_EventsHub::TEXT_DOMAIN); ?></h2>
                    <hr/>
                    <?php if ( !have_posts() ) : ?>
                        <p><?php $event_ptype = get_post_type_object( 'incsub_event' ); echo $event_ptype->labels->not_found; ?></p>
                    <?php else: ?>
                        <div class="wpmudevevents-list">
    
                        <?php while ( have_posts() ) : the_post(); ?>
                            <div class="event <?php echo Eab_Template::get_status_class($post); ?>">
                                <div class="wpmudevevents-header">
                                    <h3><?php echo Eab_Template::get_event_link($post); ?></h3>
                                    <a href="<?php the_permalink(); ?>" class="wpmudevevents-viewevent"><?php _e('View event', Eab_EventsHub::TEXT_DOMAIN); ?></a>
                                </div>
                                <?php
                                    echo Eab_Template::get_event_details($post);
                                ?>
    
                                <?php 
    
                                //PDF code
                                if(function_exists('pf_show_link')){echo pf_show_link();}
    
                                //Share button Code
                                if ( function_exists( 'ADDTOANY_SHARE_SAVE_KIT' ) ) { ADDTOANY_SHARE_SAVE_KIT(); }
    
                                ?>
    
                                <?php
                                    echo Eab_Template::get_rsvp_form($post);
                                ?>
    
                                <hr />
                            </div>
                        <?php endwhile; ?>
                        </div>
                    <?php endif; ?>
                </div>
                <?php posts_nav_link(); ?>
            </div>
    	</div>
    <?php get_sidebar( 'event' ); ?>
    <?php get_footer( 'event' ); ?>

    If you are looking to get this sorted faster, you could check the Jobs & Pros section in order to get the job done with a help of a professional. Please do note that the users in the Jobs & Pros sections are individual professionals, and doesn't have any affiliate with WPMU DEV.

    I hope this helps. Please let us know if you still need any further assistance. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.