Group users by meta field, with name of meta field as group title

i need to return/echo the name of the department/location for each group of employees That is actually a generic PHP/programming question, nonetheless, if you mean an output which looks like so: Location/Department Name – Employee/user – Employee/user – Employee/user Location/Department Name – Employee/user – Employee/user Then here’s one way of accomplishing that: Add this above/before … Read more

How to allow Contributors to edit their own posts, whilst still needing to be reviewed by an admin?

Steps for setting edited posts by contributors to “pending review”: 1. Adjust Contributor Capabilities Your modifications to the contributor role are appropriate for allowing them to edit their posts. Ensure they can edit posts but cannot publish them. 2. Automatically Revert Posts to “Pending Review” on Edit Add the following code to your functions.php. This … Read more

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/