Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // filter/hook to modify WPUF Account page's tab/section
- add_filter('wpuf_account_sections',function ($sections){
- //$sections['post'] = 'Lists'; //rename Post Tab to Post to Lists
- //$sections['subscription'] = 'Membership'; //rename Subscription Tab to Membership
- //unset( $sections['post'] ); //remove a tab (Post) from Account page
- $sections['product'] = 'Products'; // add new Tab (Products) on the Account page
- return $sections;
- },999);
- // add custom tab/cpt on the WPUF Account page's tab/section
- add_action( 'wpuf_account_content_product', 'wpuf_my_product_section', 10, 3 ); //wpuf_account_content_(your new $sections slug name)
- function wpuf_my_product_section( $sections, $current_section ) {
- echo do_shortcode('[wpuf_dashboard post_type="product"]'); //insert your post type (product) here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement