Title: 404 Error
Last modified: August 31, 2016

---

# 404 Error

 *  Resolved [servispg](https://wordpress.org/support/users/servispg/)
 * (@servispg)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/)
 * When I select an event that has been set from our site and expand it then click
   on the “Read more” It takes me to a page that has a 404 error. What do I have
   set wrong on the calendar.
 * Look here [http://www.thnaz.com/calendar-2/](http://www.thnaz.com/calendar-2/)
   
   Also it does not matter if the event is one created here or live updated event
   from Google Calendar.
 * This is the page that is shown when I select the Read more on the Day Light Savings
   time on the calendar above.
    [http://www.thnaz.com/event/daylight-saving-time-starts/?instance_id=1885](http://www.thnaz.com/event/daylight-saving-time-starts/?instance_id=1885)
 * Love the calendar except for this big issue.
 * [https://wordpress.org/plugins/all-in-one-event-calendar/](https://wordpress.org/plugins/all-in-one-event-calendar/)

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

 *  [Benjamin](https://wordpress.org/support/users/bsokic/)
 * (@bsokic)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/#post-7138411)
 * Hi,
 * Please try this solution: [https://gist.github.com/lukaspawlik/64872268a38ef5ef93c2](https://gist.github.com/lukaspawlik/64872268a38ef5ef93c2)
 *  Thread Starter [servispg](https://wordpress.org/support/users/servispg/)
 * (@servispg)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/#post-7138418)
 * Benjamin Can I do this to the file called theme-functions.php file?
    Where does
   this code go exactly? I do not want to mess the site up. This is the them I am
   using and the code in this file below that. Zion Churches and Non-Profits: theme-
   functions.php (includes/theme-functions.php)
 * <?php
 * function pagination($pages = ”, $range = 2)
 * {
 *  $showitems = ($range * 2)+1;
 *  global $paged;
 *  if(empty($paged)) $paged = 1;
 *  if($pages == ”)
 *  {
 *  global $wp_query;
 *  $pages = $wp_query->max_num_pages;
 *  if(!$pages)
 *  {
 *  $pages = 1;
 *  }
 *  }
 *  if(1 != $pages)
 *  {
 *  echo “<div class=\”pagination\”>”;
 *  if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo “[< First](https://wordpress.org/support/topic/404-erorr-1/".get_pagenum_link(1)."?output_format=md)“;
 *  if($paged > 1 && $showitems < $pages) echo “[<<](https://wordpress.org/support/topic/404-erorr-1/".get_pagenum_link($paged - 1)."?output_format=md)“;
 *  for ($i=1; $i <= $pages; $i++)
 *  {
 *  if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages
   <= $showitems ))
 *  {
 *  echo ($paged == $i)? “<span class=\”current\”>”.$i.”</span>”:”[“.$i.”](https://wordpress.org/support/topic/404-erorr-1/".get_pagenum_link($i)."?output_format=md)“;
 *  }
 *  }
 * “;
 *  if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo“
   [Last >](https://wordpress.org/support/topic/404-erorr-1/".get_pagenum_link($pages)."?output_format=md)“;
 *  echo “<span class=\”numbers\”>Page “.$paged.” of “.$pages.”</span></div>\n”;
 *  }
 * }
 * ?>
 *  Thread Starter [servispg](https://wordpress.org/support/users/servispg/)
 * (@servispg)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/#post-7138492)
 * I put that at the bottom and it is fixed now thanks!
 *  [Benjamin](https://wordpress.org/support/users/bsokic/)
 * (@bsokic)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/#post-7138503)
 * No problem, glad I could help.
 * Thanks,
    Ben

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

The topic ‘404 Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/all-in-one-event-calendar.svg)
 * [Timely All-in-One Events Calendar](https://wordpress.org/plugins/all-in-one-event-calendar/)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-event-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-event-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-event-calendar/reviews/)

## Tags

 * [calendar](https://wordpress.org/support/topic-tag/calendar/)
 * [timely](https://wordpress.org/support/topic-tag/timely/)

 * 4 replies
 * 2 participants
 * Last reply from: [Benjamin](https://wordpress.org/support/users/bsokic/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/404-erorr-1/#post-7138503)
 * Status: resolved