Magenaut

Magenaut

A blog about Magento Development, Magento bug fixing, and more

Skip to content
Menu
  • Home
  • Notes
  • Tutorial
  • Bug fixing
  • Extension
  • Server
  • Q&A
  • About

Tag: user-roles

Q&APosted onAugust 6, 2022

custom plugin not visible to some user roles

My plugin have minimum configuration like below.I can see plugin via WP admin under woocommerce main menu.but cannot see plugin from different role.That role can see woocommerce submenu.Only my custom submenu link not visible.

Read More
Q&APosted onAugust 6, 2022August 6, 2022

Select other roles as custom post authors

I created a custom post type (“Organization”), and I’ve also created a custom user role (“Representative”). Also, I’ve ensured that the Representative role has read/edit/create/publish post capabilities.

Read More
Q&APosted onAugust 6, 2022August 6, 2022

How to keep the capability of users and disable Gutenberg editor in WordPress?

I disabled Gutenberg web builder/ editor using the following code:

Read More
Q&APosted onAugust 6, 2022

How to add custom JavaScript in functions?

I want to write some JavaScript and want to assign that to a custom capability, I explored a lot but unfortunately none of them worked, any help will be appriciated.

Read More
Q&APosted onAugust 6, 2022

How to write conditions based on user capabilities not on user role?

How to write conditions on capabilities not on user role?

Read More
Q&APosted onAugust 6, 2022

Hide custom post type by user roles

I created a custom post type ( Customers ) and i want to show posts of this post type just to the users with Customer role.

Read More
Q&APosted onAugust 6, 2022

Recent posts on homepage: different thumbnail based on logged in status and post category

This works well on archive.php, but not working on the homepage. For some reason, the first statement doesn’t get applied: if a post is in Members category and user is not logged in, it’s supposed to show a default placeholder image, but instead it’s still showing the actual post thumbnail.

Read More
Q&APosted onAugust 6, 2022

Logout users upon login, based on caps/role?

To reduce spam registrations, users are assigned the pending role until they’re vetted (at which point they’re assigned the subscriber role). The pending role has no capabilities. When pending users log in, I want to log them out immediately and direct them to a page with an explanation. First, I tried the following:

Read More
Q&APosted onAugust 5, 2022

Custom shortcode for displaying user based on a role parameter

I’ve created a plugin that with a shortcode displays all users with the custom role “ansatt”. This works perfectly fine, but I’d like to be able to set the role as a parameter within the shortcode.

Read More
Q&APosted onAugust 5, 2022

Lock out all WordPress Administrators except two specific users

I used the snippet below to lock out all administrators and editors except myself

Read More

Posts navigation

Page 1 Page 2 … Page 8 Next Page

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 141 other subscribers

Recent Comments

  • anonymous on Fix libwacom9 dependency issue when upgrade Debian
  • sreedhar on Fix libwacom9 dependency issue when upgrade Debian
  • saintnick on Fix libwacom9 dependency issue when upgrade Debian
  • ranafoul on Fix libwacom9 dependency issue when upgrade Debian
  • John Fro on UFW rule from a list of IPs

Tags

actions ajax bash block-editor categories command-line custom-field custom-post-types custom-taxonomy customization database debian files filters functions hooks images javascript linux loop menus multisite permalinks permissions php plugin-development plugins post-meta posts rest-api security shell shell-script shortcode ssh terminal text-processing theme-development themes uploads url-rewriting users woocommerce-offtopic wp-admin wp-query

© Magenaut - The Magento Astronaut