Title: [Plugin: Events Manager] Single Event Page
Last modified: August 20, 2016

---

# [Plugin: Events Manager] Single Event Page

 *  [ooomes](https://wordpress.org/support/users/ooomes/)
 * (@ooomes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/)
 * Hi,
    my setting for the events page is [No Event Page] and am using template 
   tags to display future and past events in on of the pages. The event list works
   fine… shows all the events (both future and past) but when i click the event 
   it does not go to its single page rather is 404.
 * So i tried with copying the single-event.php file to my theme but no luck and
   then i tried copying all the templates in my theme inside plugins folder as mentioned
   in your documentation but again no luck.
 * Any help will be great..
 * Thanks!
 * [http://wordpress.org/extend/plugins/events-manager/](http://wordpress.org/extend/plugins/events-manager/)

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/page/2/?output_format=md)

 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288058)
 * Please try this forum @ [http://wordpress.org/support/topic/plugin-events-manager-404-error-when-clicking-on-event?replies=4](http://wordpress.org/support/topic/plugin-events-manager-404-error-when-clicking-on-event?replies=4)
 *  Thread Starter [ooomes](https://wordpress.org/support/users/ooomes/)
 * (@ooomes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288092)
 * no luck…
 * let me explain my recent settings:
 * I have a page for events called “Events” with custom WP template called “Events”
   –
   EM Settings: – Events Page -> Events – Show Events page in lists? -> No – Disable
   title rewriting? -> No
 * And am using template tags in my event template “template-events.php” to show
   all the future events in one section and then all the past events in another 
   section.
 * The thing is that it is working but when i click on the listed event title to
   go to the detail page, nothing happens. I mean the URL changes to eg. [http://abc.com/events/event/EVENT_TITLE](http://abc.com/events/event/EVENT_TITLE)
   but there is no detail rather shows the same list of Future and Past Events. 
   Even i tried with define(‘EM_DISABLE_PERMALINKS’, true); but still the same case,
   the url changes to [http://abc.com/events/?event_id=8](http://abc.com/events/?event_id=8)
 * Please need some light…
 * Thanks!
 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288201)
 * can you post your code on how you show future/past events.
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288209)
 * do any single event pages work or is it just in your lists of past/Future events?
 *  Thread Starter [ooomes](https://wordpress.org/support/users/ooomes/)
 * (@ooomes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288211)
 * Hi agelonwl,
 * my code:
 *     ```
       <?php
       /* Template Name: Events */
       get_header(); the_post();
       ?>
       <!-- EOF Header -->
   
       	<div id="container">
       		<div class="page-content">
   
       			<div class="content-main events">
       				<h2>Events</h2>
       				<?php the_content(); ?>
       				<h3>Upcoming Events</h3>
       				<?php
       					if (class_exists('EM_Events')) {
       						echo EM_Events::output( array('limit'=>0,'scope'=>'future') );
       					}
   
       				?>
       				<h3>Past Events</h3>
       				<?php
       					if (class_exists('EM_Events')) {
       						echo EM_Events::output( array('limit'=>20,'scope'=>'past', 'pagination' => 1) );
       					}
   
       				?>
   
       			</div>
       			<?php get_sidebar(); ?>
       		</div>
       <?php get_footer(); ?>
       ```
   
 * [@marcus](https://wordpress.org/support/users/marcus/):
 * Hi Marcus, Regarding the above code, I get a list of all events because of the_content()
   function and get the past and future events list too and the single page works
   but keeps the Past and Future events lists at the bottom which i don’t need on
   single page. Since i don’t need the default list of events showing up due to 
   the_content() function, i comment that wordpress function and just use the EM
   codes for past and future events then the single page does not work. The URL 
   changes to [http://SITE_URL/events/event/EVENT_NAME/](http://SITE_URL/events/event/EVENT_NAME/)
   but the page stays same (Past and Future Events List) with no event detail content.
 * Hope this explains my issue…
 * Any help is highly appreciated.
 * Thanks!
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288231)
 * you should keep the_content as all pages are served from there.
 * however, you can choose whether to show the future/past events by wrapping it
   in an if statement with a template tag like ‘is_events_page()’
 *  Thread Starter [ooomes](https://wordpress.org/support/users/ooomes/)
 * (@ooomes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288232)
 * Hi Marcus,
 * do you mind providing an example snippet as reference to my code??
 * Thanks!
 *  Thread Starter [ooomes](https://wordpress.org/support/users/ooomes/)
 * (@ooomes)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288241)
 * Hi,
 * tried a lot of things but no luck…
 * Any thoughts/suggestions on to achieve this will be a great help for me.
 * The output hoping to get:
 * **Upcoming Events**
    -  Upcoming Event Item 1
       Upcoming Event Item 2 Upcoming Event Item 3
 * **Past Events**
    -  Past Event Item 1
       Past Event Item 2 Past Event Item 3
 * Any new approach to achieve this along with working links when clicked on event
   title to view detail event??
 * Thanks!
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288244)
 * i suggest you read the docs and tutorials on our site
 * [http://wp-events-plugin.com/documentation/](http://wp-events-plugin.com/documentation/)
   
   [http://wp-events-plugin.com/tutorials/](http://wp-events-plugin.com/tutorials/)
 * there’s many ways to do this
 *  [John Bueno](https://wordpress.org/support/users/john-bueno/)
 * (@john-bueno)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288333)
 * Hey Marcus
 * I am attempting to use the is_events_page() page to remove the events on the 
   event single page however this function is throwing an error. Is it still supported?
   This is the method i am trying to use it in:
 * if(is_events_page()){
    echo(‘true’); }else{ echo(‘false’); }
 * With debug turned on I am getting an undefined function error.
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288334)
 * should be em_is_events_page()
 *  [John Bueno](https://wordpress.org/support/users/john-bueno/)
 * (@john-bueno)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288335)
 * Thanks that is working for me. One last question. Is it possible to use:
 * EM_Events::get(array());
 * or something similar to create a custom single event page by passing it an argument
   that allows it only pull the single event?
 * Right now my code looks something like this:
 * if(em_is_events_page()){
 * if (class_exists(‘EM_Events’)) {
    $events = EM_Events::get(array(‘scope’ => ‘
   future’, ‘town’=>$location, ‘category’=>$category ));
 *  foreach($events as $event) {
    if(date(‘n’, $event->start) != $month) continue;
   parse_event($event, ‘events’, $i);
 *  }
    } }else{ the_content(); }
 * and I am just placing the code in the event single section of the plugin settings.
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288336)
 * instead of EM_Events, use either
 * `$EM_Event = new EM_Event(id);`
 * or use
 * `$EM_Event = em_get_event(id);`
 * instead of grabbing many events and looping through them.
 *  [John Bueno](https://wordpress.org/support/users/john-bueno/)
 * (@john-bueno)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288337)
 * Thanks again Marcus this has been very helpful. I have one last question and 
   then I should be all set. I am attempting to use the:
 * `$EM_Event = new EM_Event(id);`
 * function which requires an event ID to generate a custom event single page. Is
   there some type of get event id function that I can use to get the id when I 
   am on the single page. At this point my url is.
 * siteurl.com/events/event/event-name
 * Thanks again!
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/#post-2288339)
 * Hi, there’s two IDs, an event id, and a post id.
 * You can use either one in shortcode.
 * To find the post id, try editing an event, and look at the URL.
 * If you’d like to view the event id, you can try using #_EVENTID in your event
   lists (sorry, need a better way to show that, will add soon). Another way is 
   to view the bookings page, or edit the event front-end, and view the event_id
   =x in the url.

Viewing 15 replies - 1 through 15 (of 17 total)

1 [2](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/page/2/?output_format=md)

The topic ‘[Plugin: Events Manager] Single Event Page’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

 * 17 replies
 * 4 participants
 * Last reply from: [John Bueno](https://wordpress.org/support/users/john-bueno/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-events-manager-single-event-page/page/2/#post-2288344)
 * Status: not resolved