Upcoming events for registered users

Support for the WordPress Calendar plugin
ezmom
Posts: 2
Joined: Mon Sep 22, 2008 5:17 pm

Upcoming events for registered users

Unread post by ezmom » Mon Sep 22, 2008 8:47 pm

I want to display upcoming events in the sidebar for registered users only. I was hoping to call a calendar function from sidebar.php after verifying user is logged in. Is there a way to do this?

I'm a newbie wordpress user, so please excuse if this should be obvious.

Thanks

User avatar
Kieran
Posts: 2059
Joined: Sat May 26, 2007 1:55 pm
Location: London
Contact:

Re: Upcoming events for registered users

Unread post by Kieran » Mon Sep 22, 2008 9:15 pm

Assuming you have the knowledge to code such a logged in check then the function you would want to call when it returned true would be

Code: Select all

echo calendar()

ezmom
Posts: 2
Joined: Mon Sep 22, 2008 5:17 pm

Re: Upcoming events for registered users

Unread post by ezmom » Mon Sep 22, 2008 9:32 pm

Thanks for the quick response. This is in the sidebar, so what I ended up using was:

<?php if (is_user_logged_in()) : ?>
<?php if (function_exists('upcoming_events') ) : ?>
<?php echo upcoming_events (); ?>
<?php endif; ?>

I had missed the 'echo' part...

Thanks!

Post Reply