Title: eccles42's Replies | WordPress.org

---

# eccles42

  [  ](https://wordpress.org/support/users/eccles42/)

 *   [Profile](https://wordpress.org/support/users/eccles42/)
 *   [Topics Started](https://wordpress.org/support/users/eccles42/topics/)
 *   [Replies Created](https://wordpress.org/support/users/eccles42/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/eccles42/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/eccles42/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/eccles42/engagements/)
 *   [Favorites](https://wordpress.org/support/users/eccles42/favorites/)

 Search replies:

## Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] tribe_get_events and multiday events](https://wordpress.org/support/topic/tribe_get_events-and-multiday-events/)
 *  Thread Starter [eccles42](https://wordpress.org/support/users/eccles42/)
 * (@eccles42)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/tribe_get_events-and-multiday-events/#post-12129391)
 * Here’s my workaround in case its of any use to anyone. This function returns 
   url and title of events that occur on a specific day, I use it in a calendar.
 * You’ll just need to adjust the “-3 days” to suit the length of events since tribe_get_events
   wont return events already in progress. It needs a bit more refinement, like 
   an end date so it doesn’t keep returning a whole year, but hopefully it’ll help
   someone.
 *     ```
       function get_event_link($day,$month,$year)
       {
       	global $post;
   
       	$searchDate = mktime(00, 00, 00, $month, $day, $year);
   
       	// Retrieve events from the search date -3 days
       	$events = tribe_get_events(  [
           	'eventDisplay' => 'custom',
           	'start_date'   => strtotime('-3 days',$searchDate)
       	] );
   
       	//loop through the events until an event between the start end end date is found
       	foreach ( $events as $post ) {
           	setup_postdata( $post ); 
                   $startDate = strtotime(tribe_get_start_date($post->ID, false, 'Y-m-d'));
                   $endDate = strtotime(tribe_get_end_date($post->ID, false, 'Y-m-d'));
   
                   if($searchDate>=$startDate && $searchDate<=$endDate)                    
       		return array(tribe_get_event_link($post),$post->post_title);
       	}
       }
       ```
   
 * Andy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[The Events Calendar] tribe_get_events and multiday events](https://wordpress.org/support/topic/tribe_get_events-and-multiday-events/)
 *  Thread Starter [eccles42](https://wordpress.org/support/users/eccles42/)
 * (@eccles42)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/tribe_get_events-and-multiday-events/#post-12087499)
 * Thanks for the reply. The thing is that it used to work and worked for quite 
   a while. I’d seen that page and my understanding of it was that start_date and
   end_date indicated the date range to search within, as described here – [https://support.theeventscalendar.com/666307-Using-tribe_get_events/666307-Using-tribe_get_events?r=1#event-specific-arguments](https://support.theeventscalendar.com/666307-Using-tribe_get_events/666307-Using-tribe_get_events?r=1#event-specific-arguments)
 * If start_date was the start of the events then the first example would only return
   events starting on the day passed to the function, not the next 5 events.
 * Amway I just wondered if anyone had encountered something similar as I can always
   code around it.
 * Thanks,
 * Andy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carousel Slider] Open Slide Link In New Window](https://wordpress.org/support/topic/open-slide-link-in-new-window/)
 *  [eccles42](https://wordpress.org/support/users/eccles42/)
 * (@eccles42)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/open-slide-link-in-new-window/#post-9906129)
 * Thanks, Sayful. And Thanks for this plugin, I couldn’t find one that did quite
   what I had in mind until I found yours.
 * Andy
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Carousel Slider] Open Slide Link In New Window](https://wordpress.org/support/topic/open-slide-link-in-new-window/)
 *  [eccles42](https://wordpress.org/support/users/eccles42/)
 * (@eccles42)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/open-slide-link-in-new-window/#post-9899835)
 * I’m getting the same thing, and having a dig around, the problem seems to be 
   in carousel-slider\templates\public\hero-banner-slider.php on the line…
 *     ```
       $_link_target = ! empty( $slide['link_target'] ) && in_array( $slide['link_target'],
        array( '_self', '_blank' ) ) ? esc_url( $slide['link_target'] ) : '_self';
       ```
   
 * The function “esc_url” should be “esc_attr”, as its an attribute that being sanitised.
   The result is that the target is ending up as “[http://_self&#8221](http://_self&#8221);,
   presumably the browser defaults to opening in a new tab as it’s invalid.
    -  This reply was modified 8 years, 7 months ago by [eccles42](https://wordpress.org/support/users/eccles42/).
    -  This reply was modified 8 years, 7 months ago by [eccles42](https://wordpress.org/support/users/eccles42/).
    -  This reply was modified 8 years, 7 months ago by [eccles42](https://wordpress.org/support/users/eccles42/).
      Reason: typos!

Viewing 4 replies - 1 through 4 (of 4 total)