Title: Create event page
Last modified: March 18, 2017

---

# Create event page

 *  [simon2902](https://wordpress.org/support/users/simon2902/)
 * (@simon2902)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/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 ([http://www.testing.fermunity.com/create-event/](http://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 '&nbsp;&nbsp;<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

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

 *  Plugin Author [shanebp](https://wordpress.org/support/users/shanebp/)
 * (@shanebp)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/create-event-page/#post-8934282)
 * #1: Try adding
 *     ```
       global $pp_ec;
       $required_fields = get_option( 'pp_events_required' );
       ```
   
 * at the top of your template.
 * #2: Probably the jquery date & time scripts are not being enqueued. Try hacking
   this `function pp_events_profile_enqueue()`
    in `buddypress-simple-events\trunk\
   inc\pp-events-screens.php` or write a separate function on the `wp_enqueue_scripts`
   hook.
 *  Thread Starter [simon2902](https://wordpress.org/support/users/simon2902/)
 * (@simon2902)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/create-event-page/#post-8958958)
 * Thanks for your response.
 * on #1: I already had this code at the top of the template and the problem persists.
 * on 2#: not sure where exactly to start here (not a fully fledged programmer myself),
   how would the wp_enqueue_scripts function look like (I only got errors when trying
   it out).
 * Thanks
    Simon

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

The topic ‘Create event page’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-simple-events.svg)
 * [BuddyPress Simple Events](https://wordpress.org/plugins/buddypress-simple-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/buddypress-simple-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-simple-events/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-simple-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-simple-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-simple-events/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [simon2902](https://wordpress.org/support/users/simon2902/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/create-event-page/#post-8958958)
 * Status: not resolved