Change WordPress user roles and capabilities Forums How to or FAQ Can I use Post name instead of Plain ID to lock Post or Pages for users?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #3442
    Jakub78
    Participant

    Hi Vladimir,
    I have a scenario to create a landing page for let’s say 10-20 users on WP installation.
    Each user can browse and see other users landing pages, but he can only update his own landing page.I know that is possible to do with your plugin.

    My question is:Is it possible to use custom Post name instead of Plain ID(settings for Permalinks)?
    Users landing page should act as their Portfolio page and it would make sense to endup with nice looking name of their profile/business/etc – domainname/peterwoodbarbershop rather than domainname/?p=123 for example.

    It would be great if we could use Post name rather than ID to restrict/allow user access to a particular page.
    Or is there any other way how to achieve what I need?I did not have time to search much yet, so sorry if this has been already answered elsewhere :).

    Thanks a lot for your reply.

    Kind Regards

    Jakub

    #3443
    Vladimir
    Keymaster

    Hi Jakub,

    You can use any permalink settings. A fact that you can use post/page ID to restrict its editing for user or role does not prevent to show that post/page to the public with user/SEO friendly permalink.

    If you wish to set edit restriction for user automatically, it’s possible via this filter.

    You can get current user login, built his landing page slug, find that page ID and return it from this filter as the only page which user is allowed to edit.

    #3444
    Jakub78
    Participant

    Hi Vladimir, that’s a great news indeed.
    I will start working on this project, when I finish another one.
    Thanks a lot for your help in this matter and have a great day.

    Kind Regards

    Jakub

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.