Skip Navigation

[Closed] Conditional based on post published status

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

This topic contains 1 reply, has 2 voices.

Last updated by Christopher Amirian 2 years, 4 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2517219

Is there any way to set up a conditional display based on if a post is published or in draft mode? We have content that we want to show, but only when the post is in draft mode. Once the post is published, we'd like that to go away.

I'm seeing Post Status under Post data as an option in the conditional, but when I select that on the left, I'm not seeing what to choose on the right for it to equal.

#2518211

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

You will need to use shortcode to get the post status of a post and use it in the conditional shortcode like the way mentioned below:

https://toolset.com/forums/topic/condition-message-if-post-is-pending-status/#post-2308547

Now I am not sure if it is possible to Not show in published mode and show in draft mode. That is something that I am not sure if is possible.

Thanks.

The topic ‘[Closed] Conditional based on post published status’ is closed to new replies.