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() {


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.