• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Redirect non-logged in users

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Redirect non-logged in users

This topic is: resolved

Tagged: landing page, maintenance, redirect

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 7 months ago by Jon Weiss.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 15, 2012 at 4:25 pm #230
    Jon Weiss
    Member

    Sometimes a plugin doesn't really work best to redirect people, or to send users to a temporary landing page. In order to temporarily send visitors that are not logged in to a landing page, try this:


    if(!is_user_logged_in()) {
    wp_redirect( 'http://www.google.com', 302 );
    }


    View My Site – Two W Media.com | I’m a Recommended StudioPress Customizer

    November 15, 2012 at 4:34 pm #232
    Len
    Member

    Awesome stuff Jon. This is the type of thing (as well as Sozo's Isotope post) that is going to make this community forum rock! 🙂

    November 15, 2012 at 4:36 pm #234
    Jon Weiss
    Member

    Glad you like it!


    View My Site – Two W Media.com | I’m a Recommended StudioPress Customizer

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Redirect non-logged in users’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2022 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble