1. Home
  2. Advanced
  3. Developers
  4. Extending the Client Portal

Extending the Client Portal

From version 2.87+ of Jetpack CRM, the Client Portal is much easier to work with. This articles gives example code for how to add extra tabs to the Portal (and how to add content to those tabs)

Add Tabs and content via WP Pages

From v2.98.8+ of Jetpack CRM you can, with Client Portal Pro, add additional tabs and pages through the  WordPress pages interface  Read the guide.

Step 1: Add to the Allowed Endpoints

The first step, is to make sure you register your endpoint with the Portal. The following is how you would do that

add_filter('zbs_portal_endpoints', 'zeroBSCRM_clientPortal_yourEndpoint');
function zeroBSCRM_clientPortal_yourEndpoint($allowed_endpoints){
	$allowed_endpoints[] = 'yourendpoint';
	return $allowed_endpoints;

This registers your endpoint for the Portal.

Step 2: Register the Endpoint

Secondly, you need to make sure that the endpoint will exist.

function zeroBSCRM_portal_your_endpoint_slug() {
	add_rewrite_endpoint( 'yourendpoint', EP_ROOT | EP_PAGES );
add_action( 'init', 'zeroBSCRM_portal_your_endpoint_slug' );

Step 3: Add to the Navigation Menu

Next, you need to register your endpoint to the admin actions.

add_filter('zbs_portal_nav_menu_items', 'zeroBSCRM_clientPortal_yourendpointMenu');
function zeroBSCRM_clientPortal_yourendpointMenu($nav_items){
	$nav_items['yourendpoint'] = array('name' => 'Nav Menu Name', 'icon' => 'fa-icon', 'show' => 1, 'slug' => 'yourendpoint');
	return $nav_items;


This adds a navigation link to the Portal, with yourendpoint as the slug.

Step 4: Add your Content

Finally, you want to have content for your endpoint. The following example also includes support for the contact needing to be logged in, and shows portal disabled, if they have Portal access disabled

add_action('zbs_portal_yourendpoint_endpoint', 'zeroBSCRM_clientPortal_yourendpoint');
function zeroBSCRM_clientPortal_yourendpoint(){

	//add actions for additional content

		return zeroBS_get_template('login.php');
		if (!zeroBSCRM_portalIsUserEnabled())
			return zeroBS_get_template('disabled.php');
			return zeroBSCRM_clientPortalProCustomerYour_Content();


The function zeroBSCRM_clientPortalProCustomerYour_Content() will output your content for the tab. The following is an example.

function zeroBSCRM_clientPortalProCustomerYour_Content(){
	$template_file = plugin_dir_path(__FILE__) . "portal/files.php";
	include $template_file;

You can view example content in any of the includes templates in the /portal/templates/ folder of Jetpack CRM. Make sure to copy the full template and edit as appropriate.

Updated on May 3, 2022

Was this article helpful?

Related Articles

Still not found an answer?
If you've searched the knowledge base and still can't find a solution, please submit a ticket.