• Resolved syafiqsyazre

    (@syafiqsyazre)


    Hi,

    Thank you for making INSERT PAGES plugin, it works perfectly!

    Currently using the plugin Widget to insert page-a and page-b in one page. Is it possible to filter some of the inserted pages based on current user logged in.

    For example, if user-1 login, only display page-a while user-2 login only display page-b.

    Regards,

Viewing 1 replies (of 1 total)
  • Plugin Author Paul Ryan

    (@figureone)

    You can create custom templates that only render for a specific user, I think. Example:

    [insert page='page-a' display='template-only-user-1.php']
    [insert page='page-b' display='template-only-user-2.php']

    and then in those templates, wrap everything in:

    <?php if ( <user-1-id> === get_current_user_id() ) : ?>
     ... 
    <?php endif; ?>

    so it only renders for that user.

Viewing 1 replies (of 1 total)
  • The topic ‘Insert Pages based on User ROle’ is closed to new replies.