Hello @andersonmichel,
This needs customization as by default it will be unavailable to show custom post type post in the account page and to remove the posts tab from the account page.
In order to remove the posts tab from the account page, please add the following code in your child theme’s functions.php file:
add_filter('wpuf_my_account_tab_links', 'remove_posts_link');
function remove_posts_link($tabs){
if(isset($tabs['posts'])) {
unset($tabs['posts']);
}
return $tabs;
}
add_filter('wpuf_account_sections', 'wpuf_get_account_sections_custom' );
function wpuf_get_account_sections_custom($account_sections){
foreach ($account_sections as $key=>$section) {
if(isset($section['slug']) && $section['slug'] == 'posts') {
unset($account_sections[$key]);
}
}
return $account_sections;
}
For showing the custom post type post, you need add custom code again. Say you want to show product type post in your account page, so you have to add the following custom code in your child theme’s functions.php file:
add_filter( 'wpuf_account_sections', 'wpuf_my_page' );
function wpuf_my_page( $sections ) {
$sections = array_merge( $sections, array( array( 'slug' => 'my-page', 'label' => 'Products' ) ) );
return $sections;
}
add_action( 'wpuf_account_content_my-page', 'wpuf_my_page_section', 10, 2 );
function wpuf_my_page_section( $sections, $current_section ) {
echo do_shortcode('[wpuf_dashboard post_type="product"]');
}
If you want to show any other custom post type post, just change it in the post_type of the shortcode above.
Regards,