In this article, we will be going over the process on how to add end/expiration dates for multi-photo post types like Photo Albums, Products, Classifieds, and Properties.
OPTION 1. Hidden field method controlled by the admin.
With this method, the admin of the website can add a Hidden Field into the Multi-Photo post's custom form and set the number of days until the post is set to expire. Once a post is created and the number of defined days has passed, then the post will be automatically marked as expired and no longer display in the website's search results. The member cannot edit or modify this expiration date.
OPTION 2. Allowing members to set the expiration date of Multi-Photo posts themselves.
With this method, the admin of the website can add a Custom HTML Field into the Multi-Photo post's custom form. Then the member can select the desired expiration date for this Multi-Photo post. The member will be able to set and edit the expiration/end date themself.
1. Hidden Field Method
To accomplish this, navigate to Toolbox >> Form Manager and customize one of the following forms:
-Feature - Classifieds
-Feature - Properties
-Feature - Photos
-Feature - Products
For this example, we are going to edit the Classifieds form.
Click on one of the Add Field buttons:
This will generate a blank field:
Fill in the information as it can be seen down below and click Save Changes:
Field Type
Select: Hidden FieldField Label Name
Enter the number of days until this post expires. In this example we are using the number "7", representing 7 days from the publish date.Database Variable
Enter the following variable: group_date_interval
2. Allowing Members to Specify an End Date Method
To accomplish this, navigate to Toolbox >> Form Manager and customize one of the following forms:
-Feature - Classifieds
-Feature - Properties
-Feature - Photos
-Feature - Products
For this example, we are going to edit the Photos form.
Click on one of the Add Field buttons:
This will generate a blank field:
Fill in the information as it can be seen down below and click Save Changes:
Field Type
Select: Custom HTML
Field Label Name
Add this widget: [widget=Bootstrap Theme - End DateTime Picker - Group]
Database Variable
Enter the following variable: group_date_calendar
The field can be seen when creating a new Photo Album post: