• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

WP SITES

2470

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Subscribe
  • Register
  • Videos
  • Log in

Need Help? - Get Coding Support Now

Redirect User To Specific Page Based On Their Capability After Logging In

This PHP code redirects any user who isn’t capable of updating the core (Only admins) to a specific url on your site.

The PHP code includes the current_user_can() and wp_redirect() functions with the admin_init hook which fires before any other hook when any user logs into any wp_admin page.

You could also use the login_redirect filter.

The code above comes from the WordPress Codex and will need modifying to work.

Similar Posts

  • How To Use A 301 Redirect In Your Functions File
  • Website Redirection – Create a 301 Permanent HTTP Redirect in htaccess
Subscribe for new Genesis Tutorials

Roles & Capabilities

Primary Sidebar

Recently Coded

  • Magazine Pro – Move Entry Date Back To The Default Position In The Post Info
  • Showcase Pro – Remove Featured Image & Show Same Page Header
  • Infinity Pro – Change Team Page From 4 To 3 Columns
  • Infinity Pro Vertical Menu
  • Genesis Sample Theme – Custom Archive Page Template With Different Hero Images

Brad Dalton Specializes In Genesis child theme customization & code modification.

Advertise · WPEngine · Genesis · Log in

  • Membership
  • by Theme
  • Contact
  • RSS
  • Newsletter ( Twice Weekly )