Tell us what you are trying to do
Hi, I am creating a custom type which is "provider" and another custom type "document". They relation is one to many, since providers can have multiple documents. There are different types of documents and need to keep a expiration date to control whichones are about to expire. Document is basically an attached filed.
My questions are:
1. how do I programatically (via api) create a provider and attach different documents to it? Any documentation to follow here?
2. How do I create a view in which the documents with expiration date are "red", and even notify via email?
Is there any documentation that you are following?
Yes, views and wp API documentation.
Is there a similar example that we can see?
Description should be enough.
What is the link to your site?
luxflow.in. Nothing public yet.
Hello. Thank you for contacting the Toolset support.
It seems that you want to establish a relationship between two posts using the PHP API.
1. how do I programatically (via api) create a provider and attach different documents to it? Any documentation to follow here?
===>
Having said that, basically you want to connect the posts to implement a relationship between two posts. If this is correct - you can use the post-relationship API function toolset_connect_posts():
=> https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts
As I understand:
- you want to list ONLY expired posts using view?
- is post-expiration settings are already set or posts are created using Toolset form?