Each user can edit only one page-wordpress

╄→尐↘猪︶ㄣ 提交于 2019-12-25 03:26:27

问题


I have wordpress website that let the user publish her busines.
Each business has a privet page with some details and image gallery.
Each business owner has a user.
I should make, that each user(Each business owner) can edit only her page, but to do that from custom designed edit page.
It work like this:
1. Joni has a fruit shop.
2. I will create for Joni a page from admin panel
3. He will log into the system and will to link for page with fields to fill.
4. After he will fill it, each visitor on the site can see this page
5. If Joni want, he can login again and change details I think to do that like this:
1. i will create a new user for the business owner.
2. i will create a new page and will insert the user id in a custom field
3. a wp query will such the data for the user edit page(the query will display the page where the custom field 'userID' is the current user id )
4. with xml-rpc to send the data and will update the details

For the gallery, I didn’t find solution yet.
I need that the gallery will assoat to the page(maybe to use custom fields like 'imagegallery1','imagegallery2' etc.)

Anybody think there is any another way to do this things?(the edit page and the gallery)
Thank's!


回答1:


The solution is to create user custom fields in the user edit / profile page.

Then each user have their own data to edit. I have used this solution in some webs to create member clubs, where each member have their own page whith their data, logo and so on. You can also use their address to create google maps.



来源:https://stackoverflow.com/questions/17082569/each-user-can-edit-only-one-page-wordpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!