Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* On the account page, the page that has the shortcode [wpuf_account], the terms posts are in two places. One is here(https://prnt.sc/olwg2e) and another is here(https://prnt.sc/olwg9i). So in order to turn this (https://prnt.sc/olwg2e) posts in My listing, you will have to use the following code in your child theme's functions.php file */
- add_filter('wpuf_account_sections', 'wpuf_get_account_sections_custom' );
- function wpuf_get_account_sections_custom($account_sections){
- $account_sections = array(
- array( 'slug' => 'dashboard', 'label' => __( 'Dashboard', 'wp-user-frontend' ) ),
- array( 'slug' => 'posts', 'label' => __( 'My Listings', 'wp-user-frontend' ) ),
- array( 'slug' => 'edit-profile', 'label' => __( 'Edit Profile', 'wp-user-frontend' ) ),
- array( 'slug' => 'subscription', 'label' => __( 'Subscription', 'wp-user-frontend' ) ),
- array( 'slug' => 'billing-address', 'label' => __( 'Billing Address', 'wp-user-frontend' ) ),
- );
- return $account_sections;
- }
- /* Next, we have another post part on the account page. In order to turn this (https://prnt.sc/olwg9i) posts into my listings, 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){
- $tabs['posts']['label'] = 'My Listings';
- return $tabs;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement