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

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

Modify Site Title URL Based On User Capability

The code in this tutorial enables you to change the site title link based on the user capability.

In this case, the site title links to the about page for users with a contributor capability.

Based on the following question from a member of the Genesis community :

The logo redirect always links back to the home page. But I would like the logo to redirect to a different page based on the user role. For example, a ‘subscriber’ will be redirected to the home page, and ‘contributor’ will be redirected to the about page.

Uses a ternary operator.

Roles & Capabilities

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems