Skip Navigation

[Resolved] I want an excerpt with picture

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

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 11 replies, has 2 voices.

Last updated by Minesh 5 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#1345877

Tell us what you are trying to do?
Create a view that has 350 characters with a picture and caption underneath picture

Is there any documentation that you are following?
I have used shortcodes, but excerpt shows caption but no picture, and post-body, shows entire post

Is there a similar example that we can see?

What is the link to your site?
hidden link, front page widget, my latest blog post

#1345989

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I would like to know at what point you stuck? Do you want to count characters and characters should not be more than 350 for post body?

By default, the wpv-post-excerpt shortcode will limit the length to 252 characters, but you can use the shortcode attributes to, for example, set a limit of 50 characters, like so:

[wpv-post-excerpt length="50" count="char"]

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-excerpt

When you say picture - you want to display post featured image?

#1346059

Hi, I understand I can use excerpt with numbers, but it also shows the image caption without the image. There is an image at the top of the page, I don't mind using this or the featured image, but I do want an image but with caption underneath, not as part of the intro.

So any one of these:
excerpt with image and caption
excerpt with featured image
body limited to 350 characters with image (and catption)

#1346061

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I suggest you should go with featured image.

So, you should display the featured image and its caption as given under with post excerpt and dispaly as per your need.

 [wpv-post-featured-image size="medium"]
 [wpv-post-featured-image output="caption"]
[wpv-post-excerpt length="50" count="char"]

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-featured-image

#1346165

Brilliant, this is helping me. The excerpt still has the caption in it. How can I use an excerpt or limited piece of content without the caption from the first image of the post?

#1346183

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

What you mean by first image of post - I do not know how you setup your content yet. You should use the featured image as I shown to display the image and caption.

Can you please share problem URL and access details so I can check how you setup the things and tell me how you want exactly to display the output.

I have set the next reply to private which means only you and I have access to it.

#1346193

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked the wp-admin access details you shared with me. But access details are not working at this end. Can you please send me working access details.

I have set the next reply to private which means only you and I have access to it.

#1346799

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - you shared the site here:
=> hidden link

And you shared the login access details for the site: hidden link

I do not see anything setup like you shared:
Here is the front page with Views widget showing an excerpt.
hidden link

Can you please make sure you send me correct login details and exactly explain what you want to add/remove from the excerpt on what page.

#1346801

I have edited my private reply above with the correct login details

#1346817

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now.

I've adjusted the view's loop output as given under for the following view:
=> hidden link

<h2>[wpv-post-link]</h2>
<div class="wp-block-image"><figure class="alignright">[wpv-post-featured-image size="medium"]</figure></div>
[wpv-post-excerpt length="350" count="char"][wpv-post-read-more label="Read more"]

I can see now the expected output: hidden link

Can you please confirm.

#1348193

Thanks, that's good, but it looks like you have removed the caption on the blog post to remove it from the article. Is it possible to have the caption on the picture in the blog post, but not have it precede the intro on the home page excerpt?

#1348633

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

No - thats not possible because as you are already aware of that, if you will add image + caption to your post body when you call the [wpv-post-excerpt] it will again display image caption first and after that the other content.

What you should do otherwise is as you can see I've added the same text to excerpt field available on the right panel.
=> hidden link

And with the view - I've added the content as given under:
=> hidden link

<h2>[wpv-post-link]</h2>
<div class="wp-block-image"><figure class="alignright">[wpv-post-featured-image size="medium"]<figcaption>[wpv-post-featured-image output="caption"]</figcaption></figure></div>
[wpv-post-excerpt length="350" count="char"][wpv-post-read-more label="Read more"]