Answers.Body: <p>Alongside with civicrm_navigationMenu (which only creates the menu item) I had to use the hook civicrm_xmlMenu which is where you specify the xml file that manages the record for civicrm_menu. This is where civicrm knows what the page_callback is for every path i.e. civicrm/sessiontypes</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-08-06T09:42:38.713Z
Answers.LastActivityDate: 2016-08-06T09:42:38.713Z
Answers.UserDisplayName: Stoycho
Body: <p>I have set the "Custom PHP Directory" as [civicrm.files]/custom_php/<br>
  Under custom_php/ I have created the folders CRM -> Event -> Page -> SessionTypes.php<br>
  I have added the menu as a hook under Events (in the admin area) which points to /wp-admin/admin.php?page=CiviCRM&amp;q=civicrm/sessiontypes but the page does not get hit.<br>
  What am I missing? Below is the content of the SessionTypes.php</p>
  
  <p>require_once 'CRM/Core/Page.php';<br>
  class CRM_Event_Page_SessionTypes extends CRM_Core_Page {<br>
    function run() {<br>
      die('innn');<br>
      parent::run();<br>
    }<br>
  }<br></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-05T13:30:45.547Z
Comments.Text: The menu hook page does not explain as to how to make that page working: civicrm/trends
  https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu
Comments.UserDisplayName: Stoycho
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-05T14:13:00.463Z
Comments.Text: First try make the changes directly in the core and test it
Comments.UserDisplayName: Ramesh - ARTECH Consultancy
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-05T15:07:03.727Z
Comments.Text: Where in core? .
Comments.UserDisplayName: Stoycho
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-08-05T15:37:43.897Z
Comments.Text: I think i've tracked it down - it needs a record in table civicrm_menu
Comments.UserDisplayName: Stoycho
Tags: <wordpress><civievent><admin>
Title: How to create new custom event page in the admin area
ThreadText: # How to create new custom event page in the admin area
  
  (Asked by: username_0 on 2016-08-05)
  
  I have set the "Custom PHP Directory" as [civicrm.files]/custom\_php/  
  Under custom\_php/ I have created the folders CRM -> Event -> Page -> SessionTypes.php  
  I have added the menu as a hook under Events (in the admin area) which points to /wp-admin/admin.php?page=CiviCRM&q=civicrm/sessiontypes but the page does not get hit.  
  What am I missing? Below is the content of the SessionTypes.php
  
  require\_once 'CRM/Core/Page.php';  
  class CRM\_Event\_Page\_SessionTypes extends CRM\_Core\_Page {  
  function run() {  
  die('innn');  
  parent::run();  
  }  
  }
  
  **Tags:** wordpress, civievent, admin
  
  > **Comments:**
  > **username_0**: The menu hook page does not explain as to how to make that page working: civicrm/trends https://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_navigationMenu  
  > **username_1**: First try make the changes directly in the core and test it  
  > **username_0**: Where in core? .  
  > **username_0**: I think i've tracked it down - it needs a record in table civicrm_menu  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2016-08-06. Score: 0 | Accepted answer
  
  Alongside with civicrm\_navigationMenu (which only creates the menu item) I had to use the hook civicrm\_xmlMenu which is where you specify the xml file that manages the record for civicrm\_menu. This is where civicrm knows what the page\_callback is for every path i.e. civicrm/sessiontypes
  
  
  ---
  
  