Support

Home Forums Event Espresso Premium How To Display The Published Status Of An Event?

How To Display The Published Status Of An Event?

Posted: December 16, 2016 at 2:05 am

Viewing 6 reply threads


ardiaful

December 16, 2016 at 2:05 am

I need to display the published status on my events on the events’ general overview table, just the same as WP displays the published status of a post or page: draft, pending review, published.


Josh

  • Support Staff

December 16, 2016 at 3:50 pm

Hi there,

The code in this gist will get you close:

https://gist.github.com/joshfeck/749eb378cb75466337d3eb10d1d0e162

Instead of displaying the post status appended to the post title, it will display the post status in its own column.


ardiaful

December 17, 2016 at 7:12 am

That works good for me. Thanks!


ardiaful

December 20, 2016 at 2:19 am

Can you please help with where to translate the words for the status: “draft”, “publish”, “pending”? I tried to include the translation in my custom plugin with no effect.


ardiaful

December 20, 2016 at 2:20 am

Check screenshot
https://postimg.org/image/rwiwva2qn/


Josh

  • Support Staff

December 20, 2016 at 8:35 am

Hi there,

Since the get_post_status() function returns the value from the database, a translation ready string (or even translated string) can be displayed instead. I updated the code example that shows how to display a translation ready text string for each post status:

https://gist.github.com/joshfeck/749eb378cb75466337d3eb10d1d0e162


ardiaful

December 20, 2016 at 9:28 am

Yes, that was definitely helpful for me. Thanks!

Viewing 6 reply threads

The support post ‘How To Display The Published Status Of An Event?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso