-
AuthorPosts
-
September 21, 2018 at 10:15 am #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,
ObeatoneSeptember 21, 2018 at 12:56 pm #1012751Hey 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,
RikardSeptember 21, 2018 at 2:39 pm #1012788Hi 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 !
RegardsSeptember 23, 2018 at 8:55 am #1013247Hi,
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,
PeterSeptember 24, 2018 at 10:07 am #1013537Hi 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 !
RegardsSeptember 25, 2018 at 7:05 am #1014020Hi,
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,
IsmaelSeptember 25, 2018 at 2:02 pm #1014177Thank you very much Ismael !
It works perfectly :)
RegardsSeptember 25, 2018 at 4:46 pm #1014279Hi Obeatone,
Glad we could help :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.