• Resolved enricotv

    (@enricotv)


    Hello,
    as the title suggests, my question arose in another topic and @rubeushagrid13 suggested me the code:

    if ( is_user_logged_in() ){
       $logged_in_user = wp_get_current_user();
       $author = '1' . ',' . $logged_in_user->ID;
    }

    but unfortunately it doesn’t work, probably there is a syntax error, I have tried some alternatives but nothing to do.
    Do you have any ideas on how to get both the administrator and the currently logged user posts?
    Thank you so much
    Enrico

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor George

    (@rubeushagrid13)

    Hi again,

    I have created temporary tasteWP site for you

    Admin area URL: https://luxuriantlift.s2-tastewp.com/wp-admin
    Username: wproyalthemes
    Password: xDdrdq3wnQo

    and test users:
    username: testauthor
    password: 1

    username: newauthor
    password: 1

    The code mentioned above works fine, if I misunderstood your case please recreate same situation in this temporary site and It will help me to better understand your issue

    kind regards

    Plugin Contributor George

    (@rubeushagrid13)

    Hi again,

    Maybe you want current logged in user to appear in author options so that you can select it from there, I have given you the code which makes post grid to show only the posts from admin and the current logged in user by default

    Kind Regards,
    George

    • This reply was modified 2 years, 6 months ago by George.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post Grid/Slider/Carousel for post of admin & current logged in user in’ is closed to new replies.