bobjgarrett
Forum Replies Created
-
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Function _load_textdomain_just_in_timeApologies, having run Query Monitor the error messages now seem to be coming from a different plugin.
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Function _load_textdomain_just_in_timeThe problem still seems to be there with the new release.
Yes! Thanks. I did not think it there!
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Function _load_textdomain_just_in_timeYes, I can confirm the problem still exists with the latest update. Hope you can fix it.
This is the code…
//Extra testcode to restrict access
// Restrict WordPress admin panel access to specific user roles
function wp_dudecom_restrict_admin_access() {
// Check if the current user is trying to access the admin panel
if (is_admin()) {
// Get the current user's role
$user = wp_get_current_user();
$allowed_roles = array('administrator', 'editor'); // Define roles that are allowed access
// Check if the user has one of the allowed roles
if (!array_intersect($allowed_roles, $user->roles)) {
// Redirect users without the allowed roles to the homepage
wp_redirect(home_url());
exit;
}
}
}
add_action('admin_init', 'wp_dudecom_restrict_admin_access');
// Ensure that users without access cannot see the admin bar
function wp_dudecom_hide_admin_bar_for_non_admins() {
// Get the current user's role
$user = wp_get_current_user();
$allowed_roles = array('administrator', 'editor'); // Define roles that are allowed to see the admin bar
// Hide the admin bar for users without the allowed roles
if (!array_intersect($allowed_roles, $user->roles)) {
add_filter('show_admin_bar', '__return_false');
}
}
add_action('after_setup_theme', 'wp_dudecom_hide_admin_bar_for_non_admins');
?>Thanks for the quick reply. I tried again and it worked. Now realise I duplicated the wrong event. My bad!
Forum: Plugins
In reply to: [Simple Membership] Only Admin sees WP ToolbarIs this likely to be taken up? I had coded something but it didn’t quite work as expected so before I try to fix it I am interested to know.
Thanks for the swift reply. It actually turned out that the form was not working (being sucessfully submitted) because of some code I had added to the theme’s functions.php file to restrict access to the dashboard. I now need to work out why it would have this additional effect. Any suggestions gratefully received!
As additional info hitting submit results in some processing but it never submits the form and simply returns to the form. You can see this here: https://www.dufour.org.uk/contact-us/
Forum: Plugins
In reply to: [Simple Membership] Only Admin sees WP ToolbarWe do at the moment but plan to remove that and find a way to allow 2 new members have editing permission for content but not member list. Also not permit general members to see the dashboard.
I believe we can do this either with some extra code or a plugin but it seems the Membership Plugin would still appear to those with Editor rights which we need to prevent.
Forum: Plugins
In reply to: [Simple Membership] Only Admin sees WP ToolbarThank you for the reply. We will look to see if we can find one, or see if we can code something. The problem relates to confidentiality of member details so I would suggest you look at adding such a feature.
Forum: Plugins
In reply to: [Simple Membership] Only Admin sees WP ToolbarThanks for the advice re that menu location and the link to the additional option.
I want to give Editors access to the Dashboard to edit content but not see the member list. Also no one but Admins and Editors should see the Dashboard. Is that possible?
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Topic Forum TagAha, I had not spotted I could also see the code view and now I can see the extra http has been added but how it got there I can only guess when using what I thought was the correct link and then modifying it to the new tag.
Hopefully now fixed.
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Topic Forum TagThe link in the email is actually sent as http://https//www.dufour.org.uk/forum/members-forum/ but the other link has only one http in it despite both being added in the same way.
Forum: Plugins
In reply to: [bbPress Notify (No-Spam)] Topic Forum TagWell this is strange.
I am definitely using the right tag. I am not sure how to install wp-cli but you can see what is in my topic notification and it link using the tag via the following image:
https://www.dufour.org.uk/wp-content/uploads/2025/05/tagtest.jpg