I have a problem with long article titles at my homepage. https://imgur.com/NhtkJh3
I've tried to condense it to one-line by putting the HTML/CSS code in plugins like sourcerer or rokcandy, however it causes a problem - HTML code is sent too for head's >title< and >meta< tags.
I have a "jm-lifestyle" template which shows 9 articles at homepage. Sadly, every element has the same class, so I'm trying to add different classes for all of them.
I found the path of php file which shows the title
<?php if ($params->get('show_title')) : ?> <h2 class="item-title" itemprop="name">
So I'm trying to add a different class of h2 by this way:
<?php foreach (range('a', 'i') as $letter); ?> <h2 class="item-title_<?php echo $letter ?>" itemprop="name">
However it makes item-title_i everywhere. I'm not really familiar with php, could you help me how to get another letter in all nine paragraphs? It's important to being not random. I would like them to stay alphabetically (or just the same everytime), so I could make different CSS classes for them. Unless, maybe you have easier way to solve it.