Having Different Home-Page Content for Logged-In Users

Hi there,

I have a question on homepage content for logged in vs. non logged-in users. I wrote some background on my project here: https://premium.wpmudev.org/forums/topic/troubles-with-membership-plugin-and-registration but starting a different thread for this separate issue.

Sorry for all the posts, I just want to document these issues separately while they are fresh in my mind.

Question: is it possible to have logged-in users see different homepage content than logged-out users (aside from the headline which can be tweaked in theme options)?

For example, on the public front-end users might see descriptions of our course offerings or specific techniques, while on the inside, we might want the homepage to display latest forum postings from their courses or other stuff like that.

I know I could re-direct them to a different page upon logged in (and probably will) but would like to be able to customize the homepage content depending on the user status, if at all possible.

Thanks,

Justin

  • Mason
    • DEV MAN’s Sidekick

    Hiya Justin,

    Thanks. We appreciate the different threads and keeping them issue-specific :slight_smile:

    Question: is it possible to have logged-in users see different homepage content than logged-out users (aside from the headline which can be tweaked in theme options)?

    Yep. It's totally doable. Check out this quick video tutorial and some sample functions for accomplishing this:
    http://buddydress.com/2010/05/logged-in-and-logged-out-content-tutorial/

    The Profile area of the homepage already works exactly this way :slight_smile:

  • Mason
    • DEV MAN’s Sidekick

    Just checking, should this type of change also be done in the child theme?

    We always recommend folks to make modifications within a child theme so that they can update the parent theme without losing any changes.

    If you're making such large modifications that you know you won't be grabbing a future theme update anyway then you can modify the parent theme. It's a personal choice, but our recommendation is to always go the child theme route if at all possible.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.