Viewing 1 replies (of 1 total)
  • aegisjester

    (@aegisjester)

    I’ve done this myself using CSS, the title has the class” title”, so you could use a selector like “.shortcode .title”, and the method here for truncating to one line:
    https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

    It basically boils down to specifying the max width of the line, then disallowing text wrap (and truncating with an ellipsis), its pretty flexible depending on what you’re trying to do.

    I also use this method to truncate my post excerpt to one line, with the title above and the “Continue Reading” below:

    .homenews-posts .excerpt {
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        text-overflow:ellipsis;
        width: 380px;
        font-size: 11px;}
    
    .homenews-posts .title {color:#239CE4;font-weight:bold;}
    
    .homenews-posts .listing-item{
    display:block;
    margin: 10px 15px -10px 0;
    padding:5px;}
    
    .homenews-posts .listing-item img{
    display:none;}

Viewing 1 replies (of 1 total)
  • The topic ‘How to shorten the titles?’ is closed to new replies.