Create event page
-
Hi
firstly, nice simple plugin. Thanks for that.
I am playing with the free version before deciding on whether or not the pro version makes sense for me.
One thing I want to do is let users create events on a separate page. I have thus attempted to make a page template (https://www.testing.fermunity.com/create-event/) similar to the create event field on the buddypress profile.I encountered two issues:
1. I get a warning for the category field (as you can see on the link above): Warning: in_array() expects parameter 2 to be array, null given in /home/fermunit/public_html/testing/wp-content/themes/socialchef-child/profile-events-create.php on line 78
the relevant code block is:
<?php if( ! empty( $categories ) ) : ?> <p> <label for="event-cats"><?php echo __( 'Categories', 'bp-simple-events' ); ?>: <?php if( in_array('categories', $required_fields) ) echo __( '*', 'bp-simple-events' ); ?></label> <?php foreach( $categories as $category ) { $checked = ''; if( in_array( $category->term_id, $pp_ec->cats_checked ) ) $checked = ' checked'; echo ' <input type="checkbox" name="event-cats[]" value="' . $category->term_id . '"' . $checked . '/> ' . $category->name . '<br/>'; } ?> </p> <?php endif; ?>
Line 78 is
if( in_array( $category->term_id, $pp_ec->cats_checked ) )
2. The calendar & time pop-up does not show up on the page like it does on the buddypress profile page.
Any suggestions would be appreciated.
Thanks
Simon
- The topic ‘Create event page’ is closed to new replies.