I am trying to:
I saw something pertaining to this before but am unable locate in support threads.
My users will initiate a member account with some basic information which will populate a parent post via a cred commerce form.
The majority of the child posts will be edited with cred forms by an admin with contributor role (hence another user).
The views will need to be displayed to the account holder on their account dashboard page using conditional logic to display data if user is logged in and is author.
Since some of the child posts as well as the parent (some occasions) will be created by a different author with admin or contributor roles.
As I stated I came across a function to do this but have been unable to locate that thread can you assist me in this please.
Dear Terry,
For the question:
using conditional logic to display data if user is logged in and is author.
1) display data if user is logged
Please try with Views shortcode [wpv-conditional] to check if it is a logged in user, for example this this thread:
https://toolset.com/forums/topic/conditional-output-if-user-is-logged-in/
More help:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
2) user is author,
Please try this:
Create a view, filter with:
Post author is the same as the logged in user
More help:
https://toolset.com/documentation/user-guides/filtering-views-query-by-author/
Apologies for not stating issue correctly. I know how to show view to. Logged in author of post. I need to be able to edit a users posts parent and children as a logged in administrator or contributor from a cred form, while keeping original author of post. I thought I had marked a thread that actually showed a function for doing this but can not locate in support threads. It was a simple function with about 4-5 lines of code.
Could you describe more details for the question:
I need to be able to edit a users posts parent and children as a logged in administrator or contributor from a cred form.
I need detail steps to duplicate same problem, thanks
Here are some documents about "Access Control for CRED Forms":
https://toolset.com/documentation/user-guides/access-control-for-cred-forms/
Access Control for Standard and Custom Content Types
https://toolset.com/documentation/user-guides/setting-access-control/
And CRED edit form does not change post author.
Thank you Luo Yang.
I believe that put my concerns at rest. Must have been an older support thread I saw. So as I understand from the articles.
If I edit users posts logged in as an admin or contributor with the proper access rights then as you stated I will not change the author.
I am also understanding that if I were to create a child posts that the original author would be associated with the child content as well, Correct?
Apology did not include example.
Example;
User creates a parent post.
There are several children posts that will be created by an administrator or contributor, for example placing a shortcode for a form or embedding a video . This is done with a cred create form.
So since the child is associated with an already created (Authored) post then the original author will be assigned?
For the question:
I am also understanding that if I were to create a child posts that the original author would be associated with the child content as well, Correct?
As I mentioned above, CRED form does not change the post author, for example:
There are two post types:
Parent post type
-- Child post type
One existed parent post "post1", which author is user A,
When you create/edit a child post with CRED form, the author of "post1" will not be changed.
Thank you for the clarification .