Skip Navigation

[Resolved] How can I integrate some custom fields info in a post as a box?

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Martin 7 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#559638

Hi,

can anyone give me a hint how I can integrate a box with the data of some custom post fields to a post? What I want to achieve is:

I want to have posts with reviews on books. I added a few custom post fields with the most important data about a book (like cover image, isbn, price and publishing company).

Now I want to display this info in a nicely designed info box in the post, best after the second paragraph. How can this be achieved? Can I use something like a shortcode in the post to define where the information box should be included? Any other options?

Thanks,
Martin

#559834

Dear Martin,

I suggest you setup the location of "info box" manually, for example:
1) Create a content template, for example "info-box-content", display those content:
like cover image, isbn, price and publishing company

2) Edit the post, find the location you want, put the content template shortcode into the post content, for example:
[wpv-post-body view_template="info-box-content"]

More help:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body
Outputs the content of the current post or renders a content template

#559966

Great, this are the hints I was looking for - and super how Toolset works! One question: I have created a view template like you wrote, saw once the right result.

Then I added some html to the view (and stripped it again as the following happened) - but now: the post body text does not show up anymore as long as I have the line

[wpv-post-body view_template="CB TPL Buchdetails"]

in it.

Any idea about that?

Martin

#560183

Please check these:
Edit the content template "CB TPL Buchdetails", make sure you did not put the shortocde in it:
[wpv-post-body view_template="none"]

If there is, please remove it and test again, it will conduct a infinite loop problem.

If there isn't, please try this:
deactivate other plugins and switch to wordpress default theme, and test again

If the problem still persists, please provide a database dump file(ZIP file) of your website in below private detail box, also point out the problem page URL, view URL, content template URL, where and how I can see the problem:
the post body text does not show up anymore as long as I have the line

The forum ‘Types Community Support’ is closed to new topics and replies.