• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Archives for is_user_logged_in

is_user_logged_in

Automatically clone theme menu location to display different menus based on login status

Chad Butler · Nov 21, 2013 ·

This article is provided free. Find out how you can get full access to premium content, including how-to articles and support forums, as well as priority email support and member exclusive plugin extensions..

 

One of the most common questions that I receive is how to display menu items based on login status.  Because there truly are several answers with multiple options, it an become a little confusing, even to more advanced users.  It really boils down to how to you want to construct your site and how do you want things to work?

I have provided different methods of doing this in the past, but that was often difficult for some users because you really needed to understand how to set up a child theme and do theme customizations appropriately.  That is not easily within reach of all users.

So I have put together a plugin extension to make this process more automatic.  Now you can handle everything through the WP Menus admin panel.  It will automatically clone any menu areas of your theme, thus providing you with the ability to serve different menus for those menu areas based on whether a user is logged in or not.

Read more about this extension here.

Site members can download this and other extensions here.

Removing items from the menu based on login status

Chad Butler · Nov 9, 2013 ·

Generally, menus are going to be filled with static items. A “set it and forget it” kind of thing.  In those cases, there are some really good methods of setting up various menus to display based on a user’s login status (here and here).

But what if that’s the case?  What if you have a menu that you will dynamically be adding content to and you just want one menu to do it all?  This filter function might suit your needs.

Continue Reading →

Creating menus based on login status – alternate version

Chad Butler · Oct 30, 2013 ·

Over in this post, I described a method of displaying different menus to users based on their login status by setting up your theme to display the different menus.  But isn’t there an easier way that doesn’t involve theme edits?

Yes.  And I’m glad you asked that question.

This method is even easier and simply requires you to drop the included code snippet into your theme’s functions.php file.  You will need to update the variable names in the snippet to reflect your menu names.

There is now a Logged In Menus Extension that makes the entire process as easy as installing a plugin.

Continue Reading →

Generic Header Login as a Widget

Chad Butler · Oct 12, 2013 ·

Using the generic header login HTML as a starting point, I created a header login widget.  This can be used in themes that have a header widget area where the sidebar widget might not fit well.

Consider this a framework to start from.  The code for the form as well as the CSS for styling for form can be customized to fit your theme’s needs. I’ve added lots of comments in the code snippets so you can follow how it is being done. Continue Reading →

Displaying the post access level when using the PayPal addon

Chad Butler · May 3, 2013 ·

Here is a handy function that I wrote to display the post access level when a user is not logged in OR they have registered and logged in, but have not yet completed payment.

If you use the PayPal addon module, you may find this useful for all kinds of different ideas.  The concept is easily adapted from what is displayed here.  

Continue Reading →
  • « Go to Previous Page
  • Page 1
  • Page 2
  • Page 3
  • Page 4
  • Go to Next Page »

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy