WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Change "No upcoming events" text (4 posts)

  1. TheSolarSpark
    Member
    Posted 1 year ago #

    I'm hoping to change the text that is automatically displayed when there are no upcoming events scheduled to something a little more optimistic ("Watch this space!" or similar) and am looking for a little guidance.

    I have copied the list.php file into a newly created Events folder in my theme directory and have located this code:

    <div class="tribe-events-no-entry">
    		<?php
    			$tribe_ecp = TribeEvents::instance();
    			if ( is_tax( $tribe_ecp->get_event_taxonomy() ) ) {
    				$cat = get_term_by( 'slug', get_query_var('term'), $tribe_ecp->get_event_taxonomy() );
    				if( tribe_is_upcoming() ) {
    					$is_cat_message = sprintf(__(' listed under %s. Check out past events for this category or view the full calendar.','tribe-events-calendar'),$cat->name);
    				} else if( tribe_is_past() ) {
    					$is_cat_message = sprintf(__(' listed under %s. Check out upcoming events for this category or view the full calendar.','tribe-events-calendar'),$cat->name);
    				}
    			}
    		?>
    		<?php if(tribe_is_day()): ?>
    			<?php printf( __('No events scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), date_i18n('F d, Y', strtotime(get_query_var('eventDate')))); ?>
    		<?php endif; ?>
    
    		<?php if(tribe_is_upcoming()){ ?>
    			<?php _e('No upcoming events', 'tribe-events-calendar');
    			echo !empty($is_cat_message) ? $is_cat_message : "."; ?>
    
    		<?php }elseif(tribe_is_past()){ ?>
    			<?php _e('No previous events' , 'tribe-events-calendar');
    			echo !empty($is_cat_message) ? $is_cat_message : "."; ?>
    		<?php } ?>
    		</div>

    I tried simply editing the 'No previous events' text, but that doesn't seem to have worked so I'm guessing I'm either editing the wrong thing or have to change something else, as well.

    Any guidance? I'm a complete web design novice and know only the basics of HTML, CSS etc. so bear with me!

    Here's the page in question

    Thanks

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 1 year ago #

    Hey TheSolarSpark,

    Try renaming your Events folder to 'events'. Other than that, that's pretty much all you need to do and I'm not sure why it's not working.

  3. TheSolarSpark
    Member
    Posted 1 year ago #

    I just tried renaming the folder from 'Events' to 'events' in my theme directory and am now receiving this parse error on the Upcoming Events page:

    Parse error: syntax error, unexpected T_STRING in /home/users/uks72361/html/thesolarspark.co.uk/wp-content/themes/twenty-twelve-child/events/list.php on line 131

    Any thoughts?!

    I've changed this:

    <?php if(tribe_is_upcoming()){ ?>
    			<?php _e('No upcoming events', 'tribe-events-calendar');
    			echo !empty($is_cat_message) ? $is_cat_message : "."; ?>

    To this:

    <?php if(tribe_is_upcoming()){ ?>
    			<?php _e('We're currently arranging some events, so watch this space!', 'tribe-events-calendar');
    			echo !empty($is_cat_message) ? $is_cat_message : "."; ?>

    Thanks

  4. jonahcoyote
    Member
    Posted 1 year ago #

    Hi TheSolarSpark,

    Unfortunately we cannot help you troubleshoot this. You'll need to figure it out on your own or hire someone to help you or consider some of these options:

    1. Check out our extensive support resources and try to figure it out on your own: https://tri.be/support/ & http://tri.be/support/forums
    2. Hire a developer to assist you. We've got a list of freelancers who know our code and who we can vouch for. Email us (pro at tri.be) and we'll pass that list your way.
    3. Purchase a Pro license to get more support: http://tri.be/shop/wordpress-events-calendar-pro/. As mentioned in the sticky thread, we can provide both a deeper and more frequent level of support for PRO users.

    I hope that helps and good luck!

    Cheers,
    - Jonah

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic