Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support thomaswild

    (@thomaswild)

    Hello @mbv,

    If you take a look at the create post type function:

    function cp_create_post_type() {

    $labels = array(
    'name' => _x( 'Private Pages', 'post type general name', 'client-portal' ),
    'singular_name' => _x( 'Private Page', 'post type singular name', 'client-portal' ),
    'menu_name' => _x( 'Private Page', 'admin menu', 'client-portal' ),
    'name_admin_bar' => _x( 'Private Page', 'add new on admin bar', 'client-portal' ),
    'add_new' => _x( 'Add New', 'private Page', 'client-portal' ),
    'add_new_item' => __( 'Add New Private Page', 'client-portal' ),
    'new_item' => __( 'New Private Page', 'client-portal' ),
    'edit_item' => __( 'Edit Private Page', 'client-portal' ),
    'view_item' => __( 'View Private Page', 'client-portal' ),
    'all_items' => __( 'All Private Pages', 'client-portal' ),
    'search_items' => __( 'Search Private Pages', 'client-portal' ),
    'parent_item_colon' => __( 'Parent Private Page:', 'client-portal' ),
    'not_found' => __( 'No Private Pages found.', 'client-portal' ),
    'not_found_in_trash' => __( 'No Private Pages found in Trash.', 'client-portal' )
    );

    $args = array(
    'labels' => $labels,
    'description' => __( 'Description.', 'client-portal' ),
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'show_in_menu' => false,
    'query_var' => true,
    'capability_type' => 'post',
    'has_archive' => false,
    'hierarchical' => true,
    'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'revisions' ),
    'exclude_from_search' => true,
    'show_in_rest' => true
    );

    if( !empty( $this->options['page-slug'] ) ){
    $args['rewrite'] = array( 'slug' => $this->options['page-slug'] );
    }
    else{
    $args['rewrite'] = array( 'slug' => $this->defaults['page-slug'] );
    }

    if( !empty( $this->options['support-comments'] ) && $this->options['support-comments'] == 'yes' )
    $args['supports'][] = 'comments';

    register_post_type( 'private-page', $args );
    }

    There is an argument called show_in_menu. Setting that to true might solve the issue you are facing.

    Plugin Author madalin.ungureanu

    (@madalinungureanu)

    If that works (setting ‘show_in_menu’ to true) , we will add a filter or find one that you can use in the future

    Thread Starter MBV

    (@mbv)

    Hi, thanks, unfortunately that didn’t do anything. Any other suggestions?

    Plugin Support thomaswild

    (@thomaswild)

    Hello @mbv

    Could you also check to see if the pages appear in the Post Types tab under Private Pages?
    I have attached a screenshot of this to help you locate this tab: https://snipboard.io/iVu1T5.jpg

    Thread Starter MBV

    (@mbv)

    Yes, they do appear as checkboxes below where you can individually tick for each user’s private page.
    But having to go in to those settings and scroll and find and tick a person every time a new user joins versus it being automatically based on post types.

    For example on the General tab I can simply select Learndash plugin’s lesson, quizz or other pages to enable it there. Is there a way to figure out how to make the Client Portal plugin’s pages show up there too?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.