• Hi

    I would like the “all events link” at bottom of widget to link to a page other than the default events page. I would like to direct visitors to another page where it displays either a calendar or list of activities depending on whether you are on desktop or mobile. Thanks !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    sorry at the moment you need to hack into the code to make this work.

    Thread Starter En18Zone

    (@en18zone)

    Hi
    Thanks for your reply but im stuck a little. My site is in use already so i fear messing up things so do you think it’s safe to do this?

    https://pastebin.com/JunDCqNy

    • This reply was modified 8 years, 1 month ago by En18Zone.
    • This reply was modified 8 years, 1 month ago by En18Zone. Reason: code formatting issues
    Thread Starter En18Zone

    (@en18zone)

    To make it more clear can i use this directly in my child theme functions.php

    //get events
    		$events = EM_Events::get(apply_filters('em_widget_events_get_args',$instance));
    		
    		//output events
    		echo "<ul>";
    		if ( count($events) > 0 ){
    			foreach($events as $event){				
    				echo $event->output( $instance['format'] );
    			}
    		}else{
    		    echo $instance['no_events_text'];
    		}
    		if ( !empty($instance['all_events']) ){
    			$events_link = (!empty($instance['all_events_text'])) ? em_get_link($instance['all_events_text']) : em_get_link(__('all events','dbem'));
    			echo '<li class="all-events-link">'.get_page_link(40).'</li>'; // Link to my new events page
    		}
    		echo "</ul>";
    		
    	    echo $args['after_widget'];

    And below is code im changing

    echo '<li class="all-events-link">'.get_page_link(40).'</li>'; // Link to my new events page

    • This reply was modified 8 years, 1 month ago by En18Zone.

    What happens when you use the code?

    Thread Starter En18Zone

    (@en18zone)

    I edited em-events.php and added it to my child theme folder but the link didn’t change. Any guidance is greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Widget all events links url’ is closed to new replies.