Skip Navigation

[Resolved] VIEW: Crop Post URL

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

Problem: I would like to crop or truncate the post URL with an ellipsis.

Solution: Use CSS text-overflow to achieve this effect.

Relevant Documentation:
https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

This support ticket is created 4 years, 9 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by leilaG 4 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1503735
crop-post-url.png

Is there a way to crop a post URL? For example is you just wanted to show the same amount of characters for every post URL that is displayed (Example attached)

#1503857

Hi, there's nothing built-in to Toolset that would truncate a URL for you just like this. I would use CSS text-overflow and a few other styles on a wrapping element to accomplish something similar. Here's a guide: https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

#1504855

Perfect just what we wanted. Thank you so much!