• Resolved pervez121

    (@pervez121)


    Hi,

    I am using the Popular Posts – By Webline plugin on my sidebar to display popular posts. However, I am unable to limit the number of characters in the post title.

    If the title is too long, is there an option or a filter available to truncate it to a specific length? Any guidance would be appreciated.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author WeblineIndia

    (@weblineindia)

    Hi pervez121,
    Thank you for reaching out regarding the Popular Posts – By Webline plugin. I understand you’re looking to truncate the post titles to a specific length when they are too long.

    At the moment, there isn’t a built-in setting for this, but you can use the following CSS snippet to limit the title length and display an ellipsis (“…”) if the title exceeds the specified width:

    .wli_popular_posts-listing h3:first-of-type a {
    ??? width: 100px; //adjust based on your need
    ??? overflow: hidden;
    ??? text-overflow: ellipsis;
    ??? display: inline-block;
    ??? white-space: nowrap;
    }

    Please follow below steps to implement the solution:

    1. Add the above CSS to the style.css file of your active theme.
    2. Adjust the width value (100px in the example) to your preferred length for truncating the title.

    Once added, this CSS will ensure that long titles are truncated to the defined width and will display an ellipsis(…) at the end.
    I hope this resolves your issue! Let me know if you need further assistance or have any more questions.

    Best regards!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.