ECHO LIST OF ALL ECP EVENT TITLES BY CATEGORY?

Home Forums Calendar Products Events Calendar PRO ECHO LIST OF ALL ECP EVENT TITLES BY CATEGORY?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1347960
    tradingbo
    Participant

    Hi ECP,

    Love the plugin and you guys have been super helpful so far with a few other issues so v curious to know if you can help me with this idea.. Seems like would be useful to other users also.

    I’m trying to create a billboard like dropdown that will simply list the titles and dates in an array for all events in the ‘Upcoming Event’ category.

    I’ve achieved this with WP Posts using

    	<ul>
    			
    			 <?php
     
    	  // The Query
    	  query_posts( array ( 'category_name' => 'Latest-News', 'posts_per_page' => -1 ) );
     
    	  // The Loop
    	 while ( have_posts() ) : the_post(); ?>
    	    <li>
    	  	<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
    	  </li>
     
    	  <?php endwhile;
     
    	  // Reset Query
    	  wp_reset_query();
     
    	  ?>
    			
    			
    		</ul>	
    

    Struggling to make it work for Custom Post types (Events) however, can you help me with the PHP we would need to implement this?

    Many Thanks!

    M

    #1348812
    Barry
    Member

    Hi M!

    We can’t go into too much depth with customizations requiring custom code, but perhaps this example will help get you started:

    $events = tribe_get_events( array(
    	'tax_query' => array(
    		array(
    			'taxonomy' => Tribe__Events__Main::TAXONOMY,
    			'field'    => 'slug',
    			'terms'    => 'parties',
    		)
    	)
    ) );
    

    The following knowledgebase article might also be of interest:

    theeventscalendar.com/knowledgebase/using-tribe_get_events

    Thanks and good luck!

    #1350672
    tradingbo
    Participant

    Hi Barry,

    That’s brilliant, thank you! Should be enough to work from.

    Is there perhaps a link you can provide with a list of all the ECP specific filters that can be called?

    I.e tribe_get_events , tribe_get_organizer

    Many Thanks!

    • This reply was modified 8 years, 6 months ago by tradingbo.
    #1350682
    Barry
    Member

    Hi!

    All of our functions are listed here:

    theeventscalendar.com/functions

    We do hope to build on this and include filters and other hooks, but for the time being that’s probably the best resource (and you can “drill down” by plugin, so for example you can focus in on Events Calendar PRO functions and ignore the rest).

    #1351907
    tradingbo
    Participant

    Brilliant, thanks for the quick response!

    #1351908
    Barry
    Member

    Happy to help 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘ECHO LIST OF ALL ECP EVENT TITLES BY CATEGORY?’ is closed to new replies.