Skip Navigation

[Resolved] wpv-post-body not displaying post body

This thread is resolved. Here is a description of the problem and solution.

Problem:

I am having an issue where the post body is not displaying when using conditional shortcodes to show the excerpt if present, and if not, show the post body.

Solution:

Please follow the recommendations provided in the following ticket to resolve the issue:

Relevant Documentation:

https://toolset.com/forums/topic/show-post-excerpt-if-not-empty-otherwise-show-post-body/

This support ticket is created 2 years, 2 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 2 replies, has 2 voices.

Last updated by Gretchen Louise 2 years, 2 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2589037

I'm trying to use conditional shortcodes to show the excerpt (if present) and if not, show the post body. The excerpt is displaying beautifully when applicable, but the post body does not show at all.

Here is the code I am using:
<wpv-loop>

[wpv-conditional if=" NOT ( empty( '[wpv-post-excerpt ]') ) " ]
<h4>[types field='story-names'][/types]</h4>
<h2 class="entry-title">[wpv-post-link]</h2>
<p>[wpv-post-excerpt output="raw"]</p>
[wpv-post-read-more label="Read More"]
[/wpv-conditional]

[wpv-conditional if=" ( empty( '[wpv-post-excerpt ]') ) " ]
<h4>[types field='story-names'][/types]</h4>
<h2 class="entry-title">[wpv-post-link]</h2>
[wpv-post-body view_template="None" suppress_filters="true"]
[/wpv-conditional]

</wpv-loop>

Link to page with view: hidden link

(Once I get it working, my next step is to figure out how to make it the default view for the taxonomy archive!)

Thank you!

#2589863

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Please kindly follow the recommendation mentioned in the ticket below:

https://toolset.com/forums/topic/show-post-excerpt-if-not-empty-otherwise-show-post-body/

Thanks.

#2591449

My issue is resolved now. Thank you!