Event + slug and calendar not showing

I am facing several problems.

First if i choose a slug for event calendar "event_calendar" everything i get is http://neputewellnesscenter.com/event_calendar "blank page"

if i create page for it and choose "upcoming-events i get what i wanted using shortcode [eab_archive] but there aren't any "preview descriptions or images for events like there are on demo, it leaves me only with title instead.
http://neputewellnesscenter.com/upcoming-events.

Can you help me out? What am i doing wrong?

Thanks!

  • Patrick

    Hi there @twotalldesign

    Welcome to WPMU DEV, glad to have you aboard!

    I just took a look at events on your site and believe that this is a theme-compatibility issue. Using the Override default appearance options, I'm able to get the events to display, but they don't sit properly with your theme layout.

    To get things displaying properly on your site, I do believe custom templates would help here. Are you comfortable with making custom templates for a custom post-type (incsub_event) based off your theme's single.php and archive.php templates?

    If not, if you can email me a copy of the theme, I,d be happy to get that sorted for you. :slight_smile:

  • Ash

    Hello @Ryan

    I hope you are well today.

    First of all, please update the plugin to latest :slight_smile:

    Please go to Events > Settings > Appearances Settings and uncheck the box for "Override default appearance?".

    Then download the attached file, unzip and paste in the root of the active theme (nollie) folder. Now refresh the event archive page.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Ash

    Hello @Ryan

    The demo is provided using a custom page template. It depends on your theme's archive page design. Or, you can create a custom page template for event page and use that.

    For archive page, you just need to create a file called archive-incsub_event.php inside of your child theme and create and use your own layout in there.

    I would like some description on upcoming events page and some image.

    If you use default theme, do you see any text in the archive page?

    If you send me your admin login and ftp login I can take a look.

    To send me details, please use our contact form: https://premium.wpmudev.org/contact/

    Select: I have a different question
    Subject: Attn-Ash
    Details: Send all required details (admin info and/or ftp details) with a link of this thread, so that I can track.
    Also post a note here once you send the info.

    I will be happy to take a look :slight_smile:

    Cheers
    Ash

  • Michael Bissett

    Hey @Ryan,

    After first adding in this code as a mu-plugin into your site:

    <?php
    
    // To enable excerpt support in Events+
    
    add_filter( 'eab-event-post_type-supports', 'adding_excerpt_support' );
    function adding_excerpt_support($supports) {
    	$supports[] = 'excerpt';
    	return $supports;
    }
    
    // To alter the excerpts on the Events+ archive pages
    
    function custom_excerpt_more( $more ) {
    	if ( is_post_type_archive( 'incsub_event' ) ) {
    		return '...';
    	}
    }
    add_filter( 'excerpt_more', 'custom_excerpt_more' );
    
    function the_excerpt_max_charlength($charlength) {
    
    	if ( is_post_type_archive( 'incsub_event' ) ) {
    
    		$excerpt = get_the_excerpt();
    		$charlength++;
    
    		if ( mb_strlen( $excerpt ) > $charlength ) {
    			$subex = mb_substr( $excerpt, 0, $charlength - 5 );
    			$exwords = explode( ' ', $subex );
    			$excut = - ( mb_strlen( $exwords[ count( $exwords ) - 1 ] ) );
    		if ( $excut < 0 ) {
    			echo mb_substr( $subex, 0, $excut );
    		} else {
    			echo $subex;
    		}
    		echo '...';
    		} else {
    		echo $excerpt;
    		}
    	}
    }

    And then adding this into the archive-incsub_event.php template inside your theme (on line 53):

    <div class="wpmudevevents-excerpt"> <?php the_excerpt_max_charlength(140); ?> </div>

    I was able to get the excerpts showing on your archive page:

    http://neputewellnesscenter.com/event_calendar/

    I also added this CSS code inside of:

    Appearance -> Theme Options - Nollie -> Layout -> Custom CSS

    .wpmudevevents-excerpt {
    clear: both;
    }

    That way, the excerpt stays on it's own line. For if the excerpt is too short (e.g. the excerpt for the "Dinner with Doc" event), then it'll be displayed to the right of the attending buttons.

    Could you confirm that it's looking as it should on your end?

    Also, in regards to this:

    I would like some description on upcoming events page and some image.

    Are you referring to adding a featured image to the post in the archive, or something else?

    Please advise,
    Michael

  • Ryan

    Are you referring to adding a featured image to the post in the archive, or something else?

    Yes. I would like to look like this, with image on the left and short description on the right, somehow like on that demo image attached.
    ------------
    I wanted big calendar on main page but then i realized calendar doesn't have any navigation for months, so it's showing only 1 month. I tried than to use widget calendar who have navigation, but that one doesn't have any title under dates like on that archive calendar... Widget calendar with just a title of events under dates, responsive, just like archive calendar but with navigation would be perfect... But since, we can't do that, than archive with widget calendar on the right would do

    Thank you!

  • Michael Bissett

    Hey @Ryan,

    After digging into this further, I've further modified the content section of your archive-incsub_event.php template from the following:

    <!-- Content -->
    <div id="Content" class="subpage<?php echo $class;?>">
    	<div class="container">
    	<div class="the_content the_content_wrapper">
    		<!-- .content -->
    
                <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
                                    echo Eab_Template::get_rsvp_form($post);
                                ?>
    			<div class="wpmudevevents-excerpt"> <?php the_excerpt_max_charlength(140); ?> </div>
                                <hr />
                            </div>
                        <?php endwhile; ?>
                        </div>
                    <?php endif; ?>
                </div>
                <?php posts_nav_link(); ?>
            </div>
    
    		<!-- Sidebar -->
    		<?php
    			if( $class ){
    				get_sidebar();
    			}
    		?>
    
    	</div>
    </div>

    To this:

    <!-- Content -->
    <div id="Content" class="subpage with_aside aside_right">
    	<div class="container">
    		<div class="content">
    		<div class="the_content the_content_wrapper">
    			<!-- .content -->
    
    				<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="eab-content-left">
    							<div id="eab-image"><?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    								the_post_thumbnail( 'medium' );
    								} ?>
    								</div>
    							</div>
    							<div class="eab-content-right">
    								<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
    									echo Eab_Template::get_rsvp_form($post);
    								?>
    				<div class="wpmudevevents-excerpt"> <?php the_excerpt_max_charlength(140); ?> </div>
    								<hr />
    							</div>
    							</div>
    						<?php endwhile; ?>
    						</div>
    					<?php endif; ?>
    				</div>
    				<?php posts_nav_link(); ?>
    			</div>
    
    		</div>
    		<!-- Sidebar -->
    		<div class="four columns widget-area">
    		<?php dynamic_sidebar( 'calendarside' ); ?>
    		</div>
    	</div>
    </div>

    I also added this CSS code inside of:

    Appearance -> Theme Options - Nollie -> Layout -> Custom CSS

    .eab-content-left {
        width: 28%;
        display: inline-table;
    }
    
    .eab-content-right {
        width: 67%;
        display: inline-table;
        padding-left: 2%;
    }

    How does the the page look now:

    http://neputewellnesscenter.com/event_calendar/

    Please advise,
    Michael

  • Ash

    Hello @Ryan

    I hope you are well today.

    Thank you so much for your nice comment :slight_smile:

    About the single event, I have created a single-incsub_event.php file inside your theme and now the events are appeared. Please check and let us know :slight_smile:

    I have also attached the file here. The file is placed in /wp-content/themes/nollie/ folder.

    This highly recommended to use a child theme in this case, as the changes will be lost when you will update the theme. You can learn more about child theme here: "http://codex.wordpress.org/Child_Themes"

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash