Navigation überspringen

[Gelöst] VIEW: Crop Post URL

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 4 Jahren, 11 Monaten. 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)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von leilaG vor 4 Jahren, 11 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#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!