How to add custom post types to your Store Manager Dashboard

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 19 reply threads
  • Author
    Posts
    • #78811
      Mitchell Gould
      Participant

      Without documentation on hooks for actions and filters, I could not figure out any other way to do this.

      I have custom post types necessary for my marketplace which come from custom plugins I’ve written. I need vendors to manage their own posts of one of these types. I’ve spent more than 20 hours exploring options like ACF, Toolset and others before finally discovering the “Menu Manager.”

      From the “Menu Manager” you can create an access point for your vendors to any page you create in the page builder. To control access, I’m using Advanced Access Manager plugin (free version) to create URL rules for that page.

      If you ant to create the pages in your custom plugin, make sure your custom post type slug matches the URL you supply to the wcfm menu manager and you’ll want to control the access to the role you desire.

      I hope this helps as WCFM gets better at developer documentation 😉

    • #79163
      WCFM Forum
      Keymaster

      HI,

      Off course it’s possible.

      We have a demo addon for this – https://drive.google.com/file/d/1ReqHNcRTXHcrQ-E4fx2TrKYq0OYhG7FX/view?usp=sharing

      You have to set your custom post type slug and title at it’s config file.

      Thank You

    • #79235
      Mitchell Gould
      Participant

      I’m confused about what this demo is supposed to show. None of the menus created by the demo load their endpoints. I can see there are views as part of the demo, but none of them load.

      Is it intended that this demo shows how to include those views in the WCFM dashboard or is it supposed to take you to another page outside the dashboard?

      How is this different than using the “Menu Manager” feature?

      Thanks.

    • #79606
      WCFM Forum
      Keymaster

      Hi,

      You can add new link under dashboard using menu manager, but those will not open under WCFM Dashboard.

      You have to set your custom post type slug and title at it’s config file.
      – Possibly you missed that, so it’s not working for you!

      Well, tell me one of your custom post type “slug” and “name”. I will change this addon to work for that.

      Thank You

    • #79643
      Mitchell Gould
      Participant

      Name: Vessels
      Slug: brnm-vessels

      Thanks.

    • #79940
      WCFM Forum
      Keymaster

      Hi,

      Please use this updated one – https://drive.google.com/file/d/1gA0ctUg-OMQ-EMrQjI3-O_79TclKS1o4/view?usp=sharing

      You will see this new menu item under dashboard – https://ibb.co/RyhCT4H

      You may change menu icon from WCFM Admin Setting -> Menu Manager

      I have just updated it’s config file with yours custom post type name and slug – https://ibb.co/nLq01yT

      Thank You

    • #81484
      Mitchell Gould
      Participant

      Hi,

      Thank you for this. For whatever reason, the original file did not have that config file in it and was named differently.

      In any case, this works for the CPT you added to the config, but it seems to only read the first one. I replaced your 2nd and 3rd cpts with mine and they do not appear.

      Thanks for your help.

    • #81752
      WCFM Forum
      Keymaster

      Hi,

      Please send me your updated addon.

      Thank You

    • #109239
      Steve Winter
      Participant

      Is there a way to add this to my child theme so it doesn’t get overwritten when I update the plugin? If so does it work like a normal child override?

    • #109885
      WCFM Forum
      Keymaster

      What you want to add in your child theme?

    • #131114
      ceo3
      Participant

      Hello, I’m using the WCFM-CPT plugin, and I want to know how do I make the three CPTs appear in the wcfm group & staff plugin’s permission control?

      • #131285

        Hello,

        It requires some custom development. Can you mentioned us exactly what are the “permission control” do you want in group capability? then we can guide you accordingly.

        Thanks!

    • #131458
      ceo3
      Participant

      Create two CTPs with the WCFM-CPT plug-in.
      I want these two custom post types “Artists” and “Exhibits” to appear under “Permissions (Capability)”. I want to configure them using the Group and Staff plugin.

      I believe it is some limitation of the plugin. Because the CPTs that appear appear in WCMF “Permissions (Capability)”.

      Attachments:
      You must be logged in to view attached files.
    • #131766

      Hello,

      As we mentioned previously, it will required custom development. We will provide you code for one post type(WCFM_CPT_1),

      Add the below code in your functions.php –

      add_action( 'wcfm_capability_manager_left_panel', 'wcfm_cpt1_capability_settings_for_group', 50 );
      function wcfm_cpt1_capability_settings_for_group($wcfm_capability_options){
      	global $WCFM, $WCFMgum,$wcfm_screen_type;
        	//print_r($wcfm_screen_type);die;
        	// CPT1 Capabilities
      		$submit_cpt1 = ( isset( $wcfm_capability_options['submit_cpt1'] ) ) ? $wcfm_capability_options['submit_cpt1'] : 'no';
      		$add_cpt1 = ( isset( $wcfm_capability_options['add_cpt1'] ) ) ? $wcfm_capability_options['add_cpt1'] : 'no';
      		$publish_cpt1 = ( isset( $wcfm_capability_options['publish_cpt1'] ) ) ? $wcfm_capability_options['publish_cpt1'] : 'no';
      		$edit_live_cpt1 = ( isset( $wcfm_capability_options['edit_live_cpt1'] ) ) ? $wcfm_capability_options['edit_live_cpt1'] : 'no';
      		$publish_live_cpt1 = ( isset( $wcfm_capability_options['publish_live_cpt1'] ) ) ? $wcfm_capability_options['publish_live_cpt1'] : 'no';
      		$delete_cpt1 = ( isset( $wcfm_capability_options['delete_cpt1'] ) ) ? $wcfm_capability_options['delete_cpt1'] : 'no';
      	
        	?>
      	<div class="vendor_capability_sub_heading"><h3><?php _e( WCFM_CPT_1_LABEL, 'wc-frontend-manager' ); ?></h3></div>
      		<?php if( in_array( $wcfm_screen_type, array( 'group','staff' ) ) ) {  
      		
      		$WCFM->wcfm_fields->wcfm_generate_form_field( apply_filters( 'wcfm_capability_settings_fields_vendor_cpt1', array("submit_cpt1" => array('label' => __('Manage', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[submit_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $submit_cpt1),
      																																																							 "add_cpt1" => array('label' => __('Add', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[add_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $add_cpt1),
      																																																							 "publish_cpt1" => array('label' => __('Publish', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[publish_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $publish_cpt1),
      																																																							 "edit_live_cpt1" => array('label' => __('Edit Live', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[edit_live_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $edit_live_cpt1),
      																																																							 "publish_live_cpt1" => array('label' => __('Auto Publish Live', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[publish_live_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $publish_live_cpt1),
      																																																							 "delete_cpt1" => array('label' => __('Delete', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[delete_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $delete_cpt1)
      																							) ) );
      		}
      }

      Then modify the functions in class-wcfmcpt-capability.php from “\wp-content\plugins\wcfm-cpt\core” –

      function wcfmcap_is_allow_manage_cpt1( $allow ) {
        	global $WCFM, $WCFMu, $WCFMgs, $wcfmgs_capability_manager_options;
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          //print_r($group_capability_options);die;
          if(isset($group_capability_options['submit_cpt1'])) {
            $submit_cpt1 = ( isset( $group_capability_options['submit_cpt1'] ) ) ? $group_capability_options['submit_cpt1'] : 'no';
            if( $submit_cpt1 == 'yes' )  return false;
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' )  return false;
          }    
          return $allow;
        }
        // WCFM wcfmcap Add Cpt1
        function wcfmcap_is_allow_add_cpt1( $allow ) {
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['add_cpt1'])) {
            $delete_cpt1 = ( isset( $group_capability_options['add_cpt1'] ) ) ? $group_capability_options['add_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
            $add_cpt1 = ( isset( $this->wcfm_capability_options['add_cpt1'] ) ) ? $this->wcfm_capability_options['add_cpt1'] : 'no';
            if( $add_cpt1 == 'yes' ) return false;      
          }
          return $allow;  	
        }  
        // WCFM wcfmcap Edit Cpt1
        function wcfmcap_is_allow_edit_cpt1( $allow ) {
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['edit_live_cpt1'])) {
            $delete_cpt1 = ( isset( $group_capability_options['edit_live_cpt1'] ) ) ? $group_capability_options['edit_live_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
              $edit_cpt1 = ( isset( $this->wcfm_capability_options['edit_live_cpt1'] ) ) ? $this->wcfm_capability_options['edit_live_cpt1'] : 'no';
            if( $edit_cpt1 == 'yes' ) return false; 
          }  	
        	return $allow;
        }  
        // WCFM wcfmcap Publish Cpt1
        function wcfmcap_is_allow_publish_cpt1( $allow ) {
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['publish_cpt1'])) {
            $delete_cpt1 = ( isset( $group_capability_options['publish_cpt1'] ) ) ? $group_capability_options['publish_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
            $publish_cpt1 = ( isset( $this->wcfm_capability_options['publish_cpt1'] ) ) ? $this->wcfm_capability_options['publish_cpt1'] : 'no';
            if( $publish_cpt1 == 'yes' ) return false;  
          }  	               
        	return $allow;
        }  
        // WCFM auto publish live cpt1
        function wcfmcap_is_allow_publish_live_cpt1( $allow ) {
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['publish_live_cpt1'])) {
            $delete_cpt1 = ( isset( $group_capability_options['publish_live_cpt1'] ) ) ? $group_capability_options['publish_live_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
            $publish_live_cpt1 = ( isset( $this->wcfm_capability_options['publish_live_cpt1'] ) ) ? $this->wcfm_capability_options['publish_live_cpt1'] : 'no';
            if( $publish_live_cpt1 == 'yes' ) return false; 
          }  	
        	return $allow;
        }  
        // WCFM wcfmcap Delete Cpt1
        function wcfmcap_is_allow_delete_cpt1( $allow ) {
          global $WCFM, $WCFMu, $WCFMgs, $wcfmgs_capability_manager_options;
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['delete_cpt1'])) {
            $delete_cpt1 = ( isset( $group_capability_options['delete_cpt1'] ) ) ? $group_capability_options['delete_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
            $delete_cpt1 = ( isset( $this->wcfm_capability_options['delete_cpt1'] ) ) ? $this->wcfm_capability_options['delete_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false;  
          }
                   
        	return $allow;
        }
      

      Make sure all WCFM plugins are updated.

      Thanks.

    • #132880
      ceo3
      Participant

      Thank you very much, the code worked. However, I still only have two problems. Menu items continue to appear even though they are disabled. see attached screen.

      The titles of the two CPTs, are appearing duplicated in WCFM’s capability.

      I await help to resolve. Thanks.

      Attachments:
      You must be logged in to view attached files.
    • #133005

      Hello,

      Regarding duplicate capability title – Modify the functions.php code

      add_action( 'wcfm_capability_manager_left_panel', 'wcfm_cpt1_capability_settings_for_group', 50 );
      function wcfm_cpt1_capability_settings_for_group($wcfm_capability_options){
      	global $WCFM, $WCFMgum,$wcfm_screen_type;
        	//print_r($wcfm_screen_type);die;
        	// CPT1 Capabilities
      		$submit_cpt1 = ( isset( $wcfm_capability_options['submit_cpt1'] ) ) ? $wcfm_capability_options['submit_cpt1'] : 'no';
      		$add_cpt1 = ( isset( $wcfm_capability_options['add_cpt1'] ) ) ? $wcfm_capability_options['add_cpt1'] : 'no';
      		$publish_cpt1 = ( isset( $wcfm_capability_options['publish_cpt1'] ) ) ? $wcfm_capability_options['publish_cpt1'] : 'no';
      		$edit_live_cpt1 = ( isset( $wcfm_capability_options['edit_live_cpt1'] ) ) ? $wcfm_capability_options['edit_live_cpt1'] : 'no';
      		$publish_live_cpt1 = ( isset( $wcfm_capability_options['publish_live_cpt1'] ) ) ? $wcfm_capability_options['publish_live_cpt1'] : 'no';
      		$delete_cpt1 = ( isset( $wcfm_capability_options['delete_cpt1'] ) ) ? $wcfm_capability_options['delete_cpt1'] : 'no';
      	if( in_array( $wcfm_screen_type, array( 'group','staff' ) ) ) {  
        	?>
      	<div class="vendor_capability_sub_heading"><h3><?php _e( WCFM_CPT_1_LABEL, 'wc-frontend-manager' ); ?></h3></div>
      		<?php 
      		
      		$WCFM->wcfm_fields->wcfm_generate_form_field( apply_filters( 'wcfm_capability_settings_fields_vendor_cpt1', array("submit_cpt1" => array('label' => __('Manage', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[submit_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $submit_cpt1),
      																																																							 "add_cpt1" => array('label' => __('Add', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[add_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $add_cpt1),
      																																																							 "publish_cpt1" => array('label' => __('Publish', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[publish_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $publish_cpt1),
      																																																							 "edit_live_cpt1" => array('label' => __('Edit Live', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[edit_live_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $edit_live_cpt1),
      																																																							 "publish_live_cpt1" => array('label' => __('Auto Publish Live', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[publish_live_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $publish_live_cpt1),
      																																																							 "delete_cpt1" => array('label' => __('Delete', 'wc-frontend-manager') , 'name' => 'wcfmgs_capability_manager_options[delete_cpt1]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $delete_cpt1)
      																							) ) );
      		}
      }

      Regarding Menu hide depending on group capability, add this code in your theme’s functions.php

      add_filter('wcfm_formeted_menus',function($menus){
      	$current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          if(isset($group_capability_options['submit_cpt1'])) {
          	$submit_cpt1 = ( isset( $group_capability_options['submit_cpt1'] ) ) ? $group_capability_options['submit_cpt1'] : 'no';
            if( $submit_cpt1 == 'yes' )  {
            	unset($menus['wcfm-cpt1']);
            }
          }
      	return $menus;
      });

      Thanks.

    • #133195
      ceo3
      Participant

      Thank you very much it worked. But I have one more need, I need CPTs to also appear in the permission settings of Managers and Staffs.

    • #133490

      Hi,

      Then modify the functions in class-wcfmcpt-capability.php from “\wp-content\plugins\wcfm-cpt\core” –
      We provide you the code for “Manage Cpt1” and “WCFM Delete Cpt1” capability, you can modify others capability following those codes

       
      // WCFM wcfmcap Manage Cpt1
        function wcfmcap_is_allow_manage_cpt1( $allow ) {
        	global $WCFM, $WCFMu, $WCFMgs, $wcfmgs_capability_manager_options;
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          
          $user_id = get_current_user_id();
          $custom_capablity = get_user_meta($user_id,'_wcfm_user_has_custom_capability',true);
          if(isset($custom_capablity) && $custom_capablity == 'yes') {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' )  return false;
          } elseif(isset($group_capability_options['submit_cpt1'])) {
            $submit_cpt1 = ( isset( $group_capability_options['submit_cpt1'] ) ) ? $group_capability_options['submit_cpt1'] : 'no';
            if( $submit_cpt1 == 'yes' )  return false;
          } else {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' )  return false;
          }
          
          return $allow;
        }
      // WCFM wcfmcap Delete Cpt1
        function wcfmcap_is_allow_delete_cpt1( $allow ) {
          global $WCFM, $WCFMu, $WCFMgs, $wcfmgs_capability_manager_options;
      
          $current_plan = wcfm_get_membership();
          if(isset($current_plan)) {
            $current_group = get_post_meta($current_plan,'associated_group',true);
            $group_capability_options = get_post_meta($current_group,'_group_capability_options',true);
          }
          //print_r($group_capability_options);
          $user_id = get_current_user_id();
          $custom_capablity = get_user_meta($user_id,'_wcfm_user_has_custom_capability',true);
          if(isset($custom_capablity) && $custom_capablity == 'yes') {
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' )  return false;
          } elseif(isset($group_capability_options['delete_cpt1'])) {
      
            $delete_cpt1 = ( isset( $group_capability_options['delete_cpt1'] ) ) ? $group_capability_options['delete_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false; 
          } else {
      
            $manage_cpt1 = ( isset( $this->wcfm_capability_options['submit_cpt1'] ) ) ? $this->wcfm_capability_options['submit_cpt1'] : 'no';
            if( $manage_cpt1 == 'yes' ) return false;
            $delete_cpt1 = ( isset( $this->wcfm_capability_options['delete_cpt1'] ) ) ? $this->wcfm_capability_options['delete_cpt1'] : 'no';
            if( $delete_cpt1 == 'yes' ) return false;  
          }
                   
        	return $allow;
        }

      Thanks.

    • #133580
      ceo3
      Participant

      Thanks. I have another need. How do I display these types of personalized posts in a new tab on the store page? Can you help me by sending a source code to add to a snippet?

    • #133629
      ceo3
      Participant

      I made the changes, but the site went offline. Did I do something wrong? Check the code as it was, please. I put this link to better visualize:

      https://pastebin.com/KxW30r2x

    • #134099

      Hello,

      I made the changes, but the site went offline. Did I do something wrong?
      >>What do you mean “site went offline” ? In this code (https://pastebin.com/KxW30r2x) have no any PHP error. So, check other custom code.

      How do I display these types of personalized posts in a new tab on the store page?
      >> The addon plugin by-default have code to add tab in vendor store page –

      // Cpt1 Store End Point
      		add_filter( 'query_vars', array( &$this, 'wcfm_cpt1_endpoint_query_var' ) );
      		add_filter( 'wcfmmp_store_tabs', array( &$this, 'wcfm_cpt1_store_tab' ), 50, 2 );
      		add_filter( 'wcfmp_store_tabs_url', array( &$this, 'wcfm_cpt1_store_tab_url' ), 50, 2 );
      		add_filter( 'wcfmp_store_default_query_vars', array( &$this, 'wcfm_cpt1_default_query_var' ) );
      		add_filter( 'wcfmp_store_default_template', array( &$this, 'wcfm_cpt1_template' ), 50, 2 );
      		add_filter( 'wcfmp_store_default_template_path', array( &$this, 'wcfm_cpt1_template_path' ), 50, 2 );

      Check the class-wcfmcpt-cpt1.php file in “\wp-content\plugins\wcfm-cpt\core”

      Thanks.

Viewing 19 reply threads
  • You must be logged in to reply to this topic.