0

How can I assigned a post to multiple post status like it will be in 'publish' status and also a custom post status say 'hide' post status.

by this publish post count will remain same and 'hide' post status can be hide from a loop.

How can this be achieved?

2 Answers 2

1

How can I assigned a post to multiple post status like it will be in 'publish' status and also a custom post status say 'hide' post status.

This can be achieved by storing a post meta value. You can do stuff on the post based on this meta value.

by this publish post count will remain same

The meta value won't change post count.

'hide' post status can be hide from a loop.

Do you mean that you don't want to show these posts in your site? You need to use meta query for that. In that case, see this answer: https://wordpress.stackexchange.com/a/188940/23214

2

You can't, really. post_status is a column in the *_posts table and it isn't meant to have duplicate values.

Use custom post meta instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.