New Member Profile Tab
-
I am making a ext for it. I need to know how can I add a new tab next to messages tab
Thanks
-
Please see our code examples:
Hey
Do you mean this?
https://gist.github.com/ultimatemember/8cdaf61e7bd9de35512cYes ??
https://gist.github.com/ultimatemember/8cdaf61e7bd9de35512c
I have used this to add 1 tab, but I need to add multiple tabs. How can i do?
Use the same code and change the tab IDs.
Thanks!
Hey,
I am using inside a class
public function __construct() { add_filter('um_profile_tabs', array( $this, 'add_custom_profile_tab' ), 1000 ); add_action('um_profile_content_mycustomtab_default', array( $this, 'um_profile_content_mycustomtab_default' )); add_filter('um_profile_tabs', array( $this, 'add_custom_profile_tab1' ), 1000 ); add_action('um_profile_content_mycustomtab1_default', array( $this, 'um_profile_content_mycustomtab1_default' )); } function add_custom_profile_tab( $tabs ) { $tabs['mycustomtab'] = array( 'name' => 'My custom tab', 'icon' => 'um-faicon-comments', ); return $tabs; } function um_profile_content_mycustomtab_default( $args ) { echo 'Hello world!'; } function add_custom_profile_tab1( $tabs ) { $tabs['mycustomtab1'] = array( 'name' => 'My custom tab', 'icon' => 'um-faicon-comments', ); return $tabs; } function um_profile_content_mycustomtab1_default( $args ) { echo 'Hello world!'; }
I am sorry it is not working. Can you please help me adding 2/3 tabs
Out of interest what type of extension are you building?
I am adding
https://www.ads-software.com/plugins/wp-job-manager/to this plugin. I have made this
https://www.ads-software.com/plugins/buddypress-job-manager/Now I want to make ultimate-member-job-manager. So It will integrate WP job-manager with ultimate-member
I want to add all tabs what are present in buddypress-job-manager to this new ext.
Here demo for buddypress
https://buddypress-job-manager.opentuteplus.com/I am unable to figure out how to add tabs. Multiple tabs not working. Though I am able to add single tab
Please visit our forum or see our code examples, we’ve written codes that allow you to add custom tab, to add multiple tabs the function names need to be unique.
Hello,
Here is my code.
class UM_WP_Job_Manager_Component { /** * Start the Job Manager component creation process * * */ public function __construct() { add_filter('um_profile_tabs', array( $this, 'add_custom_profile_tab' ), 1000 ); add_filter('um_profile_tabs', array( $this, 'add_custom_profile_tab2' ), 1000 ); add_action('um_profile_content_mycustomtab2_default', array( $this, 'um_profile_content_mycustomtab2_default' )); add_action('um_profile_content_mycustomtab_default', array( $this, 'um_profile_content_mycustomtab_default' )); } function add_custom_profile_tab( $tabs ) { $tabs['mycustomtab'] = array( 'name' => 'My custom tab', 'icon' => 'um-faicon-comments', ); return $tabs; } function add_custom_profile_tab2( $tabs ) { $tabs['mycustomtab2'] = array( 'name' => 'My custom tab', 'icon' => 'um-faicon-comments', ); return $tabs; } function um_profile_content_mycustomtab2_default( $args ) { echo "tab 2"; } function um_profile_content_mycustomtab_default( $args ) { echo "tab 1"; } } new UM_WP_Job_Manager_Component();
It adds two tabs, and displays its content. Works!!
But when I am replacing ids “mycustomtab2” with “jobmanager”, tab2 is not working. Please help me out.
Also how can I add a sub tabs?
Thanks ?? i am able to add multiple tabs.
I need to know is it possible to add sub tabs?
Please see this for example:
We use this for our bbpress extension tabs
add_filter('um_profile_tabs', 'um_bbpress_add_tab', 1000 ); function um_bbpress_add_tab( $tabs ) { global $um_bbpress; $user_id = um_user('ID'); $tabs['forums'] = array( 'name' => __('Forums','um-bbpress'), 'icon' => 'um-faicon-comments', 'subnav' => array( 'topics' => __('Topics Started','um-bbpress') . '<span>' . bbp_get_user_topic_count_raw( $user_id ) . '</span>', 'replies' => __('Replies Created','um-bbpress') . '<span>' . bbp_get_user_reply_count_raw( $user_id ) . '</span>', 'favorites' => __('Favorites','um-bbpress') . '<span>' . count( bbp_get_user_favorites_topic_ids( $user_id ) ) . '</span>', 'subscriptions' => __('Subscriptions','um-bbpress') . '<span>' . $um_bbpress->user_subscriptions_count( $user_id ) . '</span>', ), 'subnav_default' => 'topics' ); return $tabs; }
Thanks ?? It worked
- The topic ‘New Member Profile Tab’ is closed to new replies.