-
AuthorPosts
-
November 20, 2017 at 9:04 pm #879347
I have a bug in widjet – it is special character instead of the letter:
https://netpics.org/image/FrojO- This topic was modified 7 years ago by AliAbabwa.
November 21, 2017 at 6:18 am #879514Hey AliAbabwa,
Please, can you provide your WP credentials?
Best regards,
John TorvikNovember 21, 2017 at 11:12 am #879647I understood.
Without hyphen it is noraml, but in general this is not normal, because this word with a hyphen!November 21, 2017 at 1:47 pm #879723Hi AliAbabwa,
I see what you mean, can you give us ftp access? so we can check further.
Best regards,
NikkoNovember 21, 2017 at 5:25 pm #879831Ok, thank you.
November 22, 2017 at 4:25 am #880024Hi,
Thanks for providing admin and ftp access. I have added this php code at the bottom of functions.php:
function avia_get_post_list( $avia_new_query , $excerpt = false) { global $avia_config; $image_size = isset($avia_config['widget_image_size']) ? $avia_config['widget_image_size'] : 'widget'; $additional_loop = new WP_Query($avia_new_query); if($additional_loop->have_posts()) : echo '<ul class="news-wrap">'; while ($additional_loop->have_posts()) : $additional_loop->the_post(); $format = ""; if(get_post_type() != 'post') $format = get_post_type(); if(empty($format)) $format = get_post_format(); if(empty($format)) $format = 'standard'; echo '<li class="news-content post-format-'.$format.'">'; //check for preview images: $image = ""; if(!current_theme_supports('force-post-thumbnails-in-widget')) { $slides = avia_post_meta(get_the_ID(), 'slideshow'); if( $slides != "" && !empty( $slides[0]['slideshow_image'] ) ) { $image = avia_image_by_id($slides[0]['slideshow_image'], 'widget', 'image'); } } if(!$image && current_theme_supports( 'post-thumbnails' )) { $image = get_the_post_thumbnail( get_the_ID(), $image_size ); } $time_format = apply_filters( 'avia_widget_time', get_option('date_format')." - ".get_option('time_format'), 'avia_get_post_list' ); $nothumb = (!$image) ? 'no-news-thumb' : ''; echo "<a class='news-link' title='".get_the_title()."' href='".get_permalink()."'>"; echo "<span class='news-thumb $nothumb'>"; echo $image; echo "</span>"; echo "<strong class='news-headline'>".avia_backend_truncate(get_the_title(), 54," "); echo "<span class='news-time'>".get_the_time($time_format)."</span>"; echo "</strong>"; echo "</a>"; if('display title and excerpt' == $excerpt) { echo "<div class='news-excerpt'>"; the_excerpt(); echo "</div>"; } echo '</li>'; endwhile; echo "</ul>"; wp_reset_postdata(); endif; }
Let us know if you need further assistance :)
Best regards,
NikkoNovember 22, 2017 at 11:11 am #880162Thank you so much Nikko.
I would never have thought that for the correct display of a hyphen, I need this code))
By the way, if I will be update Enfold theme, will these data be lost in file functions.php ?November 22, 2017 at 11:25 am #880175Hi,
You’re welcome :) Yes, it will be lost during the theme update, I would suggest using a child theme: https://kriesi.at/documentation/enfold/using-a-child-theme/
Best regards,
NikkoDecember 8, 2017 at 3:19 pm #886508Dear Nikko.
Here is another bug like this:December 11, 2017 at 10:44 am #887272Hi,
I have modified functions-enfold.php in line 513 from:
$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),75," ");
to:
$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),70," ");
Let us know if it’s fixed on your end.
Best regards,
NikkoDecember 11, 2017 at 1:56 pm #887396Thank you, Nikko.
December 12, 2017 at 5:09 am #887698Hi,
You’re welcome :) Thanks for using Enfold!
Best regards,
NikkoDecember 13, 2017 at 11:34 am #888268Dear Nikko. Unfortunately, it looks like your code does not work((
https://netpics.org/image/GqhiV
https://netpics.org/image/GqwIi
https://netpics.org/image/Gq9N4
https://netpics.org/image/GqIk9
https://netpics.org/image/GqOK6
https://netpics.org/image/GqVTu
https://netpics.org/image/GqgWbDecember 13, 2017 at 10:21 pm #888570Hi,
Try to change 70 to other number from this code that I have changed:
$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),70," ");
Try to use lower value.
Best regards,
NikkoDecember 14, 2017 at 11:26 am #888826Dear Nikko.
I don’t understand you, I have a problem with an unread special character in Enfold blog.
I gave examples of bugs.December 14, 2017 at 4:37 pm #888959Hi AliAbabwa,
It’s a database encoding issue. Please check which encoding you have?
https://codex.wordpress.org/Converting_Database_Character_SetsBest regards,
VictoriaDecember 14, 2017 at 5:15 pm #888976December 15, 2017 at 5:12 am #889187Hi AliAbabwa,
The issue was that dash you used was using more than one character that’s why if only a part of it is captured by excerpt it doesn’t show the dash instead shows an unknown character and you can see it’s showing properly on some while on other parts it doesn’t.
Best regards,
NikkoDecember 15, 2017 at 12:39 pm #889265https://netpics.org/image/GqhiV
https://bitnewshub.com/2017/12/12/%D0%BF%D0%B0%D0%B2%D0%B5%D0%BB-%D0%B4%D1%83%D1%80%D0%BE%D0%B2-%D0%B7%D0%B0%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D0%B0%D0%BB-%D0%BD%D0%B0-bitcoin-35-%D0%BC%D0%BB%D0%BD/https://netpics.org/image/GqIk9
https://bitnewshub.com/2017/12/01/%D0%BA%D0%B0%D0%BB%D0%B5%D0%BD%D0%B4%D0%B0%D1%80%D1%8C-%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D1%8B%D1%85-blockchain-%D1%81%D0%BE%D0%B1%D1%8B%D1%82%D0%B8%D0%B9-%D0%BD%D0%B0-%D0%B4%D0%B5%D0%BA%D0%B0%D0%B1/The issue was that dash you used was using more than one character that’s why if only a part of it is captured by excerpt it doesn’t show the dash instead shows an unknown character
Dear, Nikko.
There is no some dash in this examples with bug.- This reply was modified 6 years, 11 months ago by AliAbabwa.
December 20, 2017 at 3:25 am #890684Hi,
I have adjusted the code, can you check again if it’s good?
Best regards,
NikkoDecember 20, 2017 at 11:25 am #890736Hi, Nikko.
And so on… Still have a bug.
Could you please tell me what code you adjusted? functions.php on server is exactly the same as my local copy of functions.php.January 2, 2018 at 6:33 am #892429Hi,
Sorry for the late response. This is the code I have adjusted: https://kriesi.at/support/topic/bug-in-widjet/#post-888570
I just change the number 70 to any value.Best regards,
NikkoJanuary 9, 2018 at 11:43 am #895187Dear Nikko.
I have to repeat myself, your code doesn’t work in other posts:https://netpics.org/image/SATU6
https://netpics.org/image/SAtZu
https://netpics.org/image/SAPzb
https://netpics.org/image/SAuCZ
and so on…
January 14, 2018 at 11:23 am #897054Hi,
Sorry for the late response, I have fixed avia_get_post_list function I have placed on your functions.php, I have changed this part of the code:
echo "<strong class='news-headline'>".avia_backend_truncate(get_the_title(), 50," ");
and replaced it with:
echo "<strong class='news-headline'>"; echo wp_trim_words( get_the_title(), 5, '...' );
Best regards,
NikkoJanuary 15, 2018 at 9:51 am #897445Thank you, Nikko.
Have you looked at my pages?
January 9, 2018 at 11:43 am
Still no effect((January 15, 2018 at 10:16 am #897455Hi,
Yes I have checked it. I have made changes jan. 14 and it’s should not be truncating characters instead words so the unknown character shouldn’t show up, if it does, can you point the page or pages?
Best regards,
NikkoJanuary 15, 2018 at 10:51 am #897465January 9, 2018 at 11:43 am
The same pages:1.
https://netpics.org/image/SATU62.
https://netpics.org/image/SAtZu3.
https://netpics.org/image/SAPzb4.
https://netpics.org/image/SAuCZand so on…
January 15, 2018 at 1:08 pm #897505Hi,
Thanks for providing the information, I have modified this code in functions.php:
$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : avia_backend_truncate(get_the_title($entry->ID),60," ");
and replaced it with:
$the_title = isset($entry->av_custom_title) ? $entry->av_custom_title : wp_trim_words(get_the_title($entry->ID), 5, '...' );
this should fix it. Hope it’s all good.
Best regards,
NikkoJanuary 15, 2018 at 1:34 pm #897516At last, there is no bugs now!
Thank you for your help, Nikko))January 15, 2018 at 3:37 pm #897570Hi AliAbabwa,
You’re welcome. Glad we could help and have a nice day! :)
Best regards,
Nikko -
AuthorPosts
- You must be logged in to reply to this topic.