NooTheme Premium WordPress Theme › Forums › Timetable › Excerpt on modal popup not going on new lines
- This topic has 5 replies, 2 voices, and was last updated 3 years, 4 months ago by dangdv.
-
AuthorPosts
-
3 years, 4 months ago #1213392
From the comments section:
https://codecanyon.net/item/noo-timetable-responsive-wordpress-timetable-plugin/17511898/comments
i put:
On the Popup modal the text is not adding line breaks properly as if you go here
https://theamethystcave.co.uk/southbourne-cave-timetable/ your see what i mean if you click Pilates the Phone number etc is on same line
i have tried adding this code:
function improved_trim_excerpt($text) { global $post; if ( ’’ == $text ) { $text = get_the_content(’’); $text = apply_filters(‘the_content’, $text); $text = str_replace(’\]\]\>’, ‘]]>’, $text); $text = preg_replace(’@<script[^>]?>.?</script>@si’, ’’, $text); $text = strip_tags($text, ‘
‘); $excerpt_length = 2000; $words = explode(’ ’, $text, $excerpt_length + 1); if (count($words)> $excerpt_length) { array_pop($words); array_push($words, ‘[...]’); $text = implode(’ ’, $words); } } return $text; } remove_filter(‘get_the_excerpt’, ‘wp_trim_excerpt’); add_filter(‘get_the_excerpt’, ‘improved_trim_excerpt’);
but does not seem to work
you said:
Dear, I check the popup on your site, I see the phone and email is display on 2 lines (see image) please kindly check your site again and give me more details your problem.
Best regards.
But if you look 🙂 the P: and the number are not on a new line but inside the WYSI Editor they are 🙂
Hi so the P: with phone number should be on the next line etc, i.e in the backend if we put line breaks then the system should really know this, but with the code i have paste above it works to some extent but then for this particular part its not.
Thanks
3 years, 4 months ago #1213401Dear, Please kindly send for me admin account your site via private reply, I will check details to help you.
Best regards.
3 years, 4 months ago #1213406This reply has been marked as private.3 years, 4 months ago #1213421Dear, I check details problem on your site and i think that problem maybe your theme or other plugin, please deactivate some plugin or switch to other theme to check your problem BECAUSE when i check on my local host and add custom to to disable trim and strip html tag in class excerpt with custom code
add_filter('noo_timetable_trim_excerpt', function ($excerpt, $raw_excerpt){ global $post; return $post->post_content; },10,2);
It it's show like attachment. Please check your site again.
Best regards.
Attachments:
You must be logged in to view attached files.3 years, 4 months ago #1213425Ok will take a look, so i thought might be better if i enable Divi for the custom post type which i have done,
But now when you view the popup it just shows the text all inside shortcode tabs ?
Any idea how we can fix this.
Thanks
Aaron
3 years, 4 months ago #1213447Dear, If you want show all post content in popup, please add custom code in file functions.php of your theme.
add_filter('noo_timetable_trim_excerpt', function ($excerpt, $raw_excerpt){ global $post; return $post->post_content; },10,2);
Best regards.
-
AuthorPosts
You must be logged in and have valid license to reply to this topic.