Hi @qnkov,
Yes absolutely. You can customize those templates and add the counter in the place that you want. Go to plugin folder ultimate-member->templates->profile where you will see the template file used for those tabs. It’s possible to override changed templated through child theme so that plugin/theme update won’t be able to remove your changes. Please follow this documentation for that
https://docs.ultimatemember.com/article/1516-templates-map
Thanks.
Hey there!
This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.
Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂
Regards,
Thread Starter
qnkov
(@qnkov)
@mansurahamed
@champsupertramp
Hi, i’ve reached that folder, but i don’t know how to add the counter? Do i need to do it manualy by adding a code to those files? Or everything is done by the settings inside the plugin?
-
This reply was modified 2 years, 1 month ago by
qnkov.
Hi @qnkov
Please try this code snippet to add the Comment count in the Comments tab.
add_filter("um_profile_tabs", "um_072522_add_comment_count", 10 );
function um_072522_add_comment_count( $tabs ){
if( isset( $tabs['comments'] ) ){
$args = array(
'user_id' => um_profile_id(), // Use user_id.
'count' => true // Return only the count.
);
$comments_count = get_comments( $args );
$tabs['comments']['notifier'] = $comments_count;
}
return $tabs;
}
You can add the code to your theme/child-theme’s functions.php file or use the Code Snippet plugin to run the code.