-
AuthorPosts
-
March 17, 2018 at 4:22 pm #928509
Hi everybody,
I am facing some problem displaying properly the following code:<span class="entry-info-wrap"> <span class="entry-info"> <span class="entry-image"> <img width="80" height="80" src="https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-80x80.jpg" class="attachment-thumbnail size-thumbnail wp-post-image" alt="" srcset="https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-80x80.jpg 80w, https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-320x320.jpg 320w, https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-36x36.jpg 36w, https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-130x130.jpg 130w, https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-300x300.jpg 300w, https://www.scriptorium-albi.fr/site-de-test/wp-content/uploads/2017/12/84-700_1-350x350.jpg 350w" sizes="(max-width: 80px) 100vw, 80px"> </span> <span class="entry-title"> Jean Dulac <span class="sp">|</span> Godard d’Aucour (Claude) <span class="titre">Thémidore...</span> </span> </span> </span>
The point is that I try to display spans within .entry-title class cascading inheriting therefore the table-cell property which breaks everything.
Please have a look at the pictures : and
You should notice that:
a/ the display in the a.avia-post-prev and a.avia-post-next looks different
b/ the a.avia-post-next > span.entry-title breaks the content with an ending ellipsis which curiously dosen’t seem to be set in the span.entry-title definition in layout.css
I am able to display properly the entry-title content when styling in my child theme style.css:
#top .avia-post-nav .entry-title span {display: inline-block;}
But, … for the a.avia-post-next only!
Please look at the following pictures: and
I am yet stuck.
Any kind help would be much appreciated.
Best regards.
GillesMarch 20, 2018 at 3:44 am #929486Hey scriptorium,
Please try:#top .avia-post-nav span.entry-title {display: inline-block;}
If this doesn’t help, please include the url to the page in question so we can take a closer look.
Best regards,
MikeMarch 20, 2018 at 2:00 pm #929842Hi Mike,
Thanks for your answer.
Your tip doesn’t work. Sorry, already tried it.
By the way the tip given in https://kriesi.at/support/topic/styling-the-previous-and-next-arrows/#post-368727 :/* Background Color & Opacity */ #top .avia-post-nav:hover{ background: rgba(0,120,215,0.5); }
doesn’t work either even whend forced with
! important
I guess I’ve tried everything I know.
Any help would be much appreciated.
Best regards.
GillesMarch 22, 2018 at 5:06 am #931019Hi,
Thank you for the info.
We modified the avia_post_nav function in the functions-enfold.php file, line 520.
$the_title = strip_tags($the_title);
That will remove the html tags from the title.
Best regards,
IsmaelMarch 22, 2018 at 2:55 pm #931345Hi,
Thanks for the tip which appears to be a harsh solution.
You see, entry-title is a semantic chain which has to be displayed in a specific order: illustrator (if exists), author, and title, this one has to be display after a line break. Displayed now it fits quite the container. Well, thanks. As a result it emptied the semantics expected. That’s why it appears to be a poor solution mostly because regardless to the semantics, entry-title is randomly truncated (between 39 and 58 characters, and 2 to 3 lines displayed)
Nevertheless, several questions remain regarding the avia_post_nav:
1/ how to improve the fix? I mean at least augmenting the number of characters and lines displayed?
1/ how to filter and maintain it in enfold-child/functions.php?
2/ what about the content (entry-title) which is never entirely displayed (truncated or ellipsis truncated) even if the avia-post-nav prev and next have their dimensions up sized or if the font used has its size reduced?
3/ what about the avia-post-nav prev and next background color & opacity which seems not to be modified (please read my previous message) ?
Styling avia-post-nav is not that simple!
Thanks for any kind help
Kind regards.
GillesMarch 24, 2018 at 3:42 am #932206Hi,
What do you mean by semantics? The modification above will just strip or remove the html tags like span which is causing the layout issue.
Best regards,
IsmaelMarch 24, 2018 at 2:52 pm #932357Hi,
Forget it.
Anyway, would you be kind enough to help me answering the questions I asked in my previous message?
Thanks in advance.
Regards.
GillesMarch 24, 2018 at 4:00 pm #932363Hi,
To answer your question about the color, your code was just a little off, please try this code:/* Background Color & Opacity */ #top a.avia-post-nav:hover{ background: rgba(0,120,215,0.5)!important; }
Best regards,
MikeMarch 24, 2018 at 4:24 pm #932368Hi,
Thanks for the tip.
Best regards.
GillesMarch 24, 2018 at 4:42 pm #932378March 24, 2018 at 4:47 pm #932379Hi,
Why? Don’t have any answer to provide to the following questions?
1/ how to improve the fix? I mean at least augmenting the number of characters and lines displayed?
2/ how to filter and maintain it in enfold-child/functions.php instead of loosing the fix each time Enfold is updated?
3/ what about the content (entry-title) which is never entirely displayed (truncated or ellipsis truncated) even if the avia-post-nav prev and next have their dimensions up sized or if the font used has its size reduced? (from my own point of view the code is buggy here since it breaks the content randomly)
Thanks for any kind help.
Best regards.
GillesMarch 24, 2018 at 5:24 pm #932393Hi,
Sorry, I thought you had replied to Ismael to “forget it”
But to maintain your script changes in functions-enfold.php in your child theme, simply copy the whole function from functions-enfold.php to your child themes function.php file and it will automatically overwrite the original function.
As for the last question, if Ismael’s customization didn’t work, I will allow Ismael to review, as his experience with this out weighs my own.Best regards,
MikeMarch 25, 2018 at 1:31 pm #932600Hi,
Thanks for you kind answer.
Ismael’s customization only avoids layout breaks. it doesn’t fix or explain the disturbing entry-title content truncation.
I’ll be waiting for any further answer.
Best regards.
GillesMarch 26, 2018 at 4:00 pm #933061Hi,
Since nobody seems to be willing to help, I went deep into the code, found why the entry-title content truncation worked randomly and fixed it.
If anybody is interested in here are the issue and the fix:
in functions-enfold.php:if(!function_exists('avia_post_nav')) { function avia_post_nav($same_category = false, $taxonomy = 'category') { ... $the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," "); ... //Ismael's fix $the_title = strip_tags($the_title);
The problem is that, while carefully coded, avia_backend_truncate() deals badly with span and spaces if present in product title. The 75 characters length and the double space break are not respected. As a result the truncation seems working randomly.
To get a strict 75 characters maximum chain length, it should be fixed as followed:$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : get_the_title($entry->ID); ... $the_title = avia_backend_truncate(strip_tags($the_title),75," ");
Consider the thread as closed.
Best regards.
GillesMarch 26, 2018 at 4:32 pm #933081Hi Gilles,
Glad you got it working for you! And thank you for sharing :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.