Force Profile link for username, and stop “Website” field on Profile from becoming offsite link atop Comments, in “Recent Comments” list, etc

Yup, there’ll be no link when the user doesn’t fill in that field or when leaving a comment as a guest. As far as redirecting comment links to the bbPress profile goes, popping this in your functions.php should do the trick: /** * Redirect user links in comments to BBPress profile * * @param object … Read more

How is user visits calculated

how it is calculated? It isn’t, WordPress itself doesn’t track user visits. The column you’re referring to will have been added by a plugin. If you’re hosting your site on WordPress.com then this will be Jetpack Stats. Otherwise you’ll need to ask the plugin vendor how this is done, or possibly even your theme vendor … Read more

Allow Html pages for users with specific roles

You could save the HTML files in the theme with .php extensions and a short comment at the top naming each template, then either put the check-for-certain-role conditional within the php files and apply each template to a Page you create in wp-admin; or create a custom post type, apply each template to a CPT … Read more

Can we get user profile page using user_id in the URL?

You can use the get_the_author_meta() function for this purpose. Use the get_the_author_meta(‘ID’) for only get the ID. Ensure you check the page first with is_author() function before getting the ID. https://developer.wordpress.org/reference/functions/get_the_author_meta/ https://developer.wordpress.org/reference/functions/is_author/

Sorting Users page admin column with ACF field

You can use the “pre_user_query” filter hook to modify the query that retrieves the users. Here’s an example code that how to sort the Users page admin column with an ACF field named. function sort_users_by_acf_field( $query ) { if ( ! is_admin() ) { return; } if ( isset( $query->query_vars[‘orderby’] ) && ‘user_company_name’ === $query->query_vars[‘orderby’] … Read more