WordPress.org

Ready to get started?Download WordPress

Forums

Diffierent landing/home page per user group (3 posts)

  1. Rhand
    Member
    Posted 2 years ago #

    I would like to use the same WordPress installation, limit it to registered users and show a different landing page per user group. I installed Role Scoper which seems to help a lot. The "Registered Only Plugin added to the mix makes it a members only side. But this combination of plugins does not seem to be able to load a certain slider for user group nor show widgets a-c for group a and widget blocks d-f for group b. How could I achieve that? I know Role Scoper can show pages, posts and navigation where need be. But can it also:

    • Show a different slider per user group
    • Different page/post teasers per landing page per user group?
    • Different text widgets per landing page per user group?

    Basically one installation and two or more different landing pages as they will load different slider and text blocks is what I need. Is that possible?

  2. David Gard
    Member
    Posted 2 years ago #

    In your landing page, you could use an if statement, and then have a function that generates the correct code in a file that you include, saving the need for a different page for each user role. -

    require('includes/show-role-content');
    (if(current_user_can('administrator')) :
        show_content('administrator');
    elseif(current_user_can('editor')) ) :
        show_content('editor');
    endif;
  3. Rhand
    Member
    Posted 2 years ago #

    Thanks for the feedback duck_boy. That is a possible approach that goes in the direction I want to go.. I would only need the Role Scoper function for grabbing the user group instead of a WordPress Role. I guess this will require some more digging.

Topic Closed

This topic has been closed to new replies.

About this Topic