Hide DRAFT Pages if authored by Overlord (id=1)

I'm syndicating some content across multiple sites in my WPMU network. But in some cases, I change the status of that syndicated content on a subsite to DRAFT.

I would like to hide DRAFT Pages authored by me (Overlord, id=1) from all other users of that subsite. Can't seem to wrap my head around a simple addition to my functions.php to do this. Can you help?

Thanks!
Larry

  • Rupok

    Hi Larry, hope you had a wonderful day.

    I tried searching for a quick solution in the Internet for last 30 minutes but could not find any rock solid info on this. There are some plugins for post/page access control but none of the explicitly deals with drafts. Still it can be done by checking current logged in user ID, then author ID of all posts where post_status is draft. And if author ID == 1 and current user ID != 1, then hide that draft and do this in a loop for all posts. The coding will be complex and I'm afraid, that is beyond my scope.

    So either you can hire a developer from our Jobs Section or you can wait until some other users comes up with some working code snippets. Please keep in mind, developers found in our Jobs Section are not associated with us. So please communicate with them well before you make any payments to them.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.