Event Date Placement in Archives

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 11 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4322

    I’d like to get the next occurrence of an event to appear below the heading of my events archive. I’ve played with adding some code from the events-archive.php to my own theme’s archive.php in various places, but am unable to find a way to get this to appear below the event title.

    http://www.stnicholaskenilworth.org.uk/events/category/events/

    get($themeslug.'_archive_breadcrumbs') == "1") { synapse_breadcrumbs();}?>
    
    <!--Begin @synapse before content sidebar hook-->
    
    <!--End @synapse before content sidebar hook-->
    
    &lt;div id=&quot;content&quot; class=&quot;"&gt;
    
    
    
        <!--Begin @synapse before_archive hook-->
    
        <!--End @synapse before_archive hook-->
    
    
    
    
            &lt;div  id="post-"&gt;
    

                        &lt;time itemprop=&quot;startDate&quot; datetime=&quot;"&gt;
    
            <!--Begin @synapse archive hook-->
    
            <!--End @synapse archive hook-->
    
            <!--Begin @Core post tags hook-->
    
            <!--End @Core post tags hook-->
    
            <!--end post_class--> 
        <!--end post container--> 
        <!--Begin @iFeature post bar hook-->
    
            <!--End @iFeature post bar hook-->
    
    
    
    
    
    
        Nothing found
    
    
    
        <!--Begin @synapse pagination hook-->
    
        <!--End @synapse pagination hook-->
    
        <!--Begin @synapse after_archive hook-->
    
        <!--End @synapse after_archive hook-->
        <!--end content_padding-->
    
    <!--Begin @synapse after content sidebar hook-->
    
    <!--End @synapse after content sidebar hook-->
    
        <!--end content-->
    


    Steve
    #4979

    Hi Steve,

    You’ll want to edit the taxonomy-event-category.php template. And you’ll want the eo_get_next_occurrence_of()

    E.g.

       //Inside the 'loop'
      $next = eo_get_next_occurrence_of();
      if( $next ){
          $start = $next['start'];
          echo 'Next occurrence is on '.$start->format('jS F Y');
       }
    
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.