Skip Navigation

[Resolved] Display a shortcode in the wordpress list page of a given post type.

This support ticket is created 5 years 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.

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 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 1 voice.

Last updated by francoisP-6 5 years ago.

Assisted by: Shane.

Author
Posts
#1464069

Hi !

I created a post type (illustration) and defined its render using a content template, and display it into normal posts using a shortcode.

This is basically something like [illustration id="post-id"] where post-id is the ID of the illustration.

I wish I could display the instruction to use the illustration directly in the wordpress illustrations page. Elementor does this with its models, and it is very handy, just display the list of models, pick the one you like, copy its shortcode and past it into you host post.

So I created a standard one liner field and give it as a default value a shortcode of my own which dumps [illustration id="post-id"] with the correct post-id. Then I declared in the illustration definition page that the list page should display that field.

It works fine, but I want this field value not to be seen on the editor, so I use some known-to-be-false condition not to display it.

But when I save a new illustration, it is then empty, and so is the column in the list.

Any ideas ?

#1464133

My issue is resolved now. Thank you!
Nothing to do with Toolset. Had to use manage_POST_SLUG_posts_columns and manage_POST_SLUG_posts_custom_column