• Resolved darksigns

    (@darksigns)


    hi,
    I would like to use the default events list format (which can be edited in the settings >> formatting >> events) in my custom list. how can I do it? I simply put the events_list.php in, but it doesn’ work.
    here is my custom list page widt two columns:

    <?php
    $args = array(	'post_type' => 'event',
    				'posts_per_page' => 10,
    				'meta_query' => array(
    					array( 'key' => '_start_ts', 'value' => current_time('timestamp'), 'compare' => '>=', 'type'=>'numeric' )),
    				'orderby' => 'event_start_date',
    				'order' => 'DESC'
     				 );
    $loop = new WP_Query( $args );?>
    <?php $num_cols = 2; // set the number of columns here
    for ( $i=1 ; $i <= $num_cols; $i++ ) :
    echo '<div id="col-' . $i . '" class="col" >';
    $counter = $num_cols + 1 - $i; ?>
    	<?php while ( $loop->have_posts() ) : $loop->the_post();
    		if( $counter%$num_cols == 0 ) :
    		// begin of core posts output ?>
    		<?php include_once 'plugins/events-manager/templates/events-list.php;?>
        <?php endif; $counter++; endwhile;?>
    		<?php rewind_posts();
    echo'</div>'; endfor; ?>
        <?php if (  $wp_query->max_num_pages > 1 ) : ?>
    	<div id="nav-below" class="navigation">
    		<?php if(function_exists('page_navi')) { page_navi(); } else { ?>
    		<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
    		<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
    		<?php } ?>
            </div><!-- #nav-below -->
    	<?php endif;?>
    <?php wp_reset_query(); ?>

    I also tried to put the table from the events-manager format settings:

    <table  class="eventtable" width="400"cellpadding="5px" cellspacing="5" class="post" ><tr>
        <td  class="eventimage" rowspan="3" width="100">#_EVENTIMAGE{100,100}</td>
        <td class="eventname"> #_EVENTLINK</td>
      </tr>
      <tr>
        <td class="eventexp">#_EVENTEXCERPT</td>
      </tr>
      <tr>
        <td class="eventdate"><table width="100%" border="0" cellpadding="5px">
            <tr>
              <td class="leftcol"><span class="eventplace">#_LOCATIONNAME</span><br>#_EVENTDATES</td>
              <td class="rightcol"></td>
            </tr>
        </table></td>
      </tr>
    </table>

    but instead the data just the #_x placeholder is there.:(
    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘using event format settings on a custom event list’ is closed to new replies.