Answers.Body: <p>If you didn't want to install a plugin, you could also add a redirect directly to functions.php in your theme. Something like the below would let you redirect only administrators to CiviCRM.</p>
  
  <pre><code>function civicrm_login_redirect( $url, $request, $user ){
      if( $user &amp;&amp; is_object( $user ) &amp;&amp; is_a( $user, 'WP_User' ) ) {
          if( $user-&gt;has_cap( 'administrator' ) ) {
              $url = admin_url( 'admin.php?page=CiviCRM', 'https' );
          } else {
              $url = home_url('/some-landing-page/');
          }
      }
      return $url;
  }
  add_filter('login_redirect', 'civicrm_login_redirect', 10, 3 );
  </code></pre>
  
  <p><a href="https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect" rel="nofollow">https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-10T00:37:42.840Z
Answers.LastActivityDate: 2015-04-10T00:37:42.840Z
Answers.UserDisplayName: James Bradach
Answers.Body: <p>There is also a plugin available in the WordPress Repository that allows you to set redirects depending on WP user roles. 
  <a href="https://wordpress.org/plugins/login-with-ajax/" rel="nofollow">https://wordpress.org/plugins/login-with-ajax/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-29T00:26:01.683Z
Answers.LastActivityDate: 2015-07-29T00:26:01.683Z
Answers.UserDisplayName: Birgit Pauli-Haack
Answers.Body: <p>You could try Peter's Login Redirect to set the landing page to /wp-admin/admin.php?page=CiviCRM after successful authentication.</p>
  
  <p>see <a href="https://wordpress.org/plugins/peters-login-redirect/">https://wordpress.org/plugins/peters-login-redirect/</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-09T23:42:10.227Z
Answers.Text: That worked perfectly and took two minutes to set up, thanks!
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-09T23:29:41.193Z
Answers.LastActivityDate: 2015-04-09T23:29:41.193Z
Answers.UserDisplayName: Dave Florence
Body: <p>In Drupal, you can go to <strong>Configuration menu > Site Information</strong> and set <a href="http://mysite.org/civicrm" rel="nofollow">http://mysite.org/civicrm</a> to be the default front page.  That way, once a user is authenticated, they're dropped right on to the CiviCRM dashboard.  How do you perform an equivalent task in Wordpress?</p>
  
Tags: <wordpress>
Title: How do you set CiviCRM to be the default page for users in Wordpress?
ThreadText: # How do you set CiviCRM to be the default page for users in Wordpress?
  
  (Asked by: username_0 on 2015-04-09)
  
  In Drupal, you can go to **Configuration menu > Site Information** and set <http://mysite.org/civicrm> to be the default front page. That way, once a user is authenticated, they're dropped right on to the CiviCRM dashboard. How do you perform an equivalent task in Wordpress?
  
  **Tags:** wordpress
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2015-04-09. Score: 6 | Accepted answer
  
  You could try Peter's Login Redirect to set the landing page to /wp-admin/admin.php?page=CiviCRM after successful authentication.
  
  see <https://wordpress.org/plugins/peters-login-redirect/>
  
  > **Comments:**
  > **username_0**: That worked perfectly and took two minutes to set up, thanks!  
  
  ---
  
  ### Answer by username_1 on 2015-04-10. Score: 4
  
  If you didn't want to install a plugin, you could also add a redirect directly to functions.php in your theme. Something like the below would let you redirect only administrators to CiviCRM.
  
  ```
  function civicrm_login_redirect( $url, $request, $user ){
      if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
          if( $user->has_cap( 'administrator' ) ) {
              $url = admin_url( 'admin.php?page=CiviCRM', 'https' );
          } else {
              $url = home_url('/some-landing-page/');
          }
      }
      return $url;
  }
  add_filter('login_redirect', 'civicrm_login_redirect', 10, 3 );
  
  ```
  
  <https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect>
  
  
  ---
  
  ### Answer by username_2 on 2015-07-29. Score: 1
  
  There is also a plugin available in the WordPress Repository that allows you to set redirects depending on WP user roles.
  <https://wordpress.org/plugins/login-with-ajax/>
  
  
  ---
  
  