Skip Navigation

[Resolved] Can you display on the front end a post expiration date?

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 9 replies, has 2 voices.

Last updated by larryB-3 10 months, 3 weeks ago.

Assisted by: Mateus Getulio.

Author
Posts
#2614347

I've turned on the front-end user form post expiration date to expire a post X due of days after posted. I would like to be able to display this on the front-end. Is there a way to display that value?

#2614465

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thank you for contacting our support forum. I'll be happy to assist you

You'll find a "Countdown" block from Toolset in the blocks list, which can be used to show the countdown timer, linked to a date type custom field, for instance.

I am attaching some examples in screenshots from the backend and the frontend showing this block:

- hidden link
- hidden link

Please let me know if this explanation is clear to you and solves the question. Thank you.

Best regards,
Mateus.

#2614787

Hi Mateus. I don't use blocks, so is there a shortcode or some sort of code I can use?

#2615019

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hey there,

Thanks for your reply.

Yes, in this case you'll need to customize a code having the desired function and shortcode. Please check these examples that my colleagues gave for similar questions:

- https://toolset.com/forums/topic/days-to-go-for-future-date-calculation-future-date-now/
- https://toolset.com/forums/topic/display-countdown-using-date-field/

Note: the possible solution provided is to be used just as an informational one. Please remember that custom coding is out of the scope of our support, so we can't create, debug or modify code for you and it's your responsibility to maintain it. We hope the one we used as an example could point you in the right direction. Please check our support policy: https://toolset.com/toolset-support-policy/

Thanks for your understanding. If you need anything else don't hesitate to contact us.

#2615033

Sorry, I am not asking for a countdown. I just want to simply display the date this post is set to expire.

#2615159

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Larry,

Thanks for your reply.

Sorry for this back and forth. By chance, are you not able to add the date expiration field in the View output, for instance? https://toolset.com/documentation/legacy-features/views-plugin/digging-into-view-outputs/

If this is still not what you really want to achieve, in order to fully understand it, may I kindly ask you to show us where exactly do you want to display this information? Also, I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://toolset.com/privacy-policy-and-gdpr-compliance/#data-shared-with-our-support
**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

#2615595

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks for providing the credentials, but could you please also point us to the exact location you want to show the post expiration date?

About this:


I don't see Post Date Expiration as a field that I can insert. See screenshot.

It is expected, you would need to first create a 'Date' custom field in the correspondent field group, fill it in the desired post, and then display it in the screen you shared with us. Kindly give it a try and let us know if you're able to achieve it now.

If not, please show us an example of place you would insert this info and we'll check it better. Thank you.

#2615749
Screenshot 2023-06-14 at 7.08.40 AM.jpg
Screenshot 2023-06-14 at 7.09.32 AM.jpg

Mateus, please help me understand why are you asking me to create another custom field, when your tool provides the field already as shown in the screenshot, it's in the top right corner of the post on the back-end edit screen, it's in a box called "Artist expiration".

I would like to include this field not only on the front-end user display on a single post layout, but as well in a Toolset view that I use on the My Account dashboard as well as it should be available to send in the Notifications that go out, e.g. from the User Form you can send all kind of data fields in the email and we should let the user know when their post will expire.

#2615899

Mateus Getulio
Supporter

Languages: English (English )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello Larry,

Thanks for your reply.

May I kindly ask you to test this shortcode? https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_post_expiration. We tested to insert it in a shortcode block and it seems to work fine.

Sorry for not sharing it previously, the whole thread I was thinking in a more complex system (like the countdown, or the displaying of a specific custom field), and forgot about this simple function. Thanks for your understanding and patience.

Please give it a try and let us know if you have the desired results. Thank you.

#2615913

My issue is resolved now. Thank you! That short code was what I was looking for.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.