Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ckandl

    (@ckandl)

    Woops, never mind. I found it in the templates.

    Thread Starter ckandl

    (@ckandl)

    Woops, I pasted too much code. Here’s the general direction I’ve been attempting:

    Code on Pastebin

    Thanks, I saw the widget but I didn’t want it in the sidebar. I also wanted more control over the formatting.

    OK, This is a bit of a hack I think but, here’s how I was able to display the upcoming events on my home page:

    <?php query_posts($query_string . '&category_name=events'); ?>
    	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    		<?php if(the_event_start_date(null, false, mdY) >= date(mdY)) : ?>
    		<li class="event">
    			<?php if ( is_new_event_day() ) : ?><h4 class="event-day"><?php echo the_event_start_date( null, false ); ?></h4><?php endif; ?>
    			<div class="event-content">
    				<?php the_title('<h2 class="event-title"><a href="' . get_permalink() . '" title="' . the_title_attribute('echo=0') . '" rel="bookmark">', '</a></h2>'); ?>
    				<?php the_excerpt() ?>
    			</div>
    		</li>
    	<?php endif; ?>
    <?php endwhile; else: ?>
    	<p>No Events</p>
    <?php endif; ?>

    Let me add a little bit more information:

    I am using a custom template for my Home page, which is set to be used in the page settings. In the reading preferences for wordpress, I have my front page displays set to that Home page.

    The custom template lives up in the root of the themes folder, not in the /events folder I created to hold my list.php, gridview.php and single.php files (as wordpress will not let me use custom templates in that folder for pages).

    Thanks again.

    I’ve been scratching my head over the weekend trying to figure out how to get this to work. I’d like to display a list of upcoming events on my home page.

    When I look into the list.php file, I can’t see how you are actually getting posts for the Events category only in your loop. Is there something going on in the global variable ($spEvents) I am not catching? I thought that was just for CSS and JS stuff but I could be wrong..

    Anyway, I can obviously do a loop (via the_post()) with a query for the Events category to loop through that category only.. but then I get listings for events that have past already too.

    When I try with your get_events() loop, all I get is thousands of listings that just have the title “Home” and link to the home page, no events at all.

    Any suggestions?

    Thank you! Otherwise, this is looking to be the most promising events plugin out there! In the future I’d like to work on a version with the events marked up using Microformats classes, but for now I just need to get a project done.

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