Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1012702

    Hi,

    I’m writing you because I didn’t find how to limit Articles titles character in the Avia Articles blog module.
    I added an Article blog module in my page with Avia framework and I choosed Grid display.

    I would like to limit characters for title or limit it to 2 lines.

    Thank you for helping !

    Regards,
    Obeatone

    #1012751

    Hey Obeatone,

    Where can we see the results you are getting? If the titles are long then it’s difficult to limit the amount of lines unfortunately.

    Best regards,
    Rikard

    #1012788

    Hi Rikard,
    You will find the link in private content.

    I already find how to limit the article content in post grid. I added this in functions.php :
    add_filter(‘avf_postgrid_excerpt_length’,’avia_change_postgrid_excerpt_length’, 10, 1);
    function avia_change_postgrid_excerpt_length($length)
    {
    $length = 65;
    return $length;
    }

    Is there a function to also limit the article title in postgrid ? This is what i’m searching :)

    Thank you for your help !
    Regards

    #1013247

    Hi,

    You can use this css code to truncate the titles:

    
    h3.slide-entry-title.entry-title {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    

    Best regards,
    Peter

    #1013537

    Hi Dude,

    Thank you for answering !

    The problem with this solution is that I only have one line of titles.
    Is it possible to do the same thing with two lines ?

    Thank you very much for your help !
    Regards

    #1014020

    Hi,

    Remove the css code and then limit the title characters instead. Add this code in the functions.php file:

    add_action('wp_footer', 'ava_custom_limit_title');
    function ava_custom_limit_title(){
    	?>
    	<script type="text/javascript">
    		(function($) {	
                $('.slide-entry-title a').text(function(index, text) {
                    return text.substr(0, 50) + '...';
                });
    		})(jQuery);
    	</script>
    	<?php
    }

    Best regards,
    Ismael

    #1014177

    Thank you very much Ismael !
    It works perfectly :)
    Regards

    #1014279

    Hi Obeatone,

    Glad we could help :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.