Skip Navigation

[Resolved] Format 'read more' link in post excerpt

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

Last updated by paulG-5 5 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#1283957

I'm trying to add my own formatted button for a read more in a post excerpt, instead of a text link.

The except text will only show 250 letters, but if there is more than 250 I want the read more button to show and open a lightbox to show the full text.

I've tried adding a condition but this doesn't work.

[wpv-post-excerpt length="250" more="..."]
[wpv-conditional if="( '[wpv-post-excerpt]' gt '250' )"]
Read More
[/wpv-conditional]

Is there a way this is achievable?

Any help would be great.

#1284013

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

[wpv-post-excerpt] shortcode returns the string not count of character or word. You need to write custom shortcode to count the number of characters of post excerpt and return the count and then you can use the [wpv-conditional] shortcode to check the character count.

Please check the following solution - you need to adjust the code according to your requirement.
=> https://toolset.com/forums/topic/limit-post-body-content-by-words-cannot-use-exerpt-because-content-has-an-link/#post-360425

If you do not know how to do it, please share problem URL and access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

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

#1284113

Thanks Minesh. Perfect!