-
Author
-
April 3, 2017 at 14:07 #157447fabianno0572Participant
Hello,
My website is dual lingual and when I post chinese language blog, it occupies too much space in the home page. How can I minimize the preview?
Here is the image link. Please refer to the image for better understanding.
April 4, 2017 at 03:20 #157545LauraModeratorHello, will assign the ticket to a higher support level who can help and advise you in your query.
Thanks! ?Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionLaura Solanes - Graphic Designer and Web Designer
Please be patient as I try to answer each topic as fast as i can.
If you like the theme or the support you've received please consider leaving us a review on Themeforest!
Always happy to help you 🙂
April 5, 2017 at 18:25 #157725RaduModeratorHi,
Add this function to wp-content/themes/kleo-child/functions.php
COPY CODE/*Fix chinesse characters on excerpt*/ function sq_fix_excerpt_chinesse_characters($excerpt) { return mb_substr( $excerpt, 0, 10 ); } add_filter('the_excerpt', 'sq_fix_excerpt_chinesse_characters', 99);
Let me know
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 5, 2017 at 18:43 #157727fabianno0572ParticipantI had uploaded.but it seems the same. No changes.
Please check on the website : mymassageinfo.comApril 6, 2017 at 19:11 #157829RaduModeratorDo you have kleo child theme installed and activated?
If yes provide to me ftp login access and wp admin to take a closer look (in a private reply)
Cheers
R.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 19, 2017 at 18:27 #158945RaduModeratorHi,
Done,
Please check it, limit can be changed from /wp-content/themes/kleo-child/functions.php
Replace 350 with your desired number or characters
Code below:
COPY CODEif ( ! function_exists( 'kleo_excerpt' ) ) { function kleo_excerpt( $limit = 50, $words = false ) { /*Force excerpt length*/ $limit = 350; $from_content = false; $excerpt_initial = get_the_excerpt(); if ( $excerpt_initial == '' ) { $excerpt_initial = get_the_content(); $from_content = true; } $excerpt_initial = preg_replace( '<code>\[[^\]]*\]</code>', '', $excerpt_initial ); $excerpt_initial = strip_tags( $excerpt_initial ); /* If we got it from get_the_content -> apply length restriction */ if ( $from_content ) { $excerpt_length = apply_filters( 'excerpt_length', $limit ); $excerpt_initial = wp_trim_words( $excerpt_initial, $excerpt_length, '' ); } if ( $words ) { $excerpt = explode( ' ', $excerpt_initial, $limit ); if ( count( $excerpt ) >= $limit ) { array_pop( $excerpt ); $excerpt = implode( " ", $excerpt ) . '...'; } else { $excerpt = implode( " ", $excerpt ) . ''; } } else { $excerpt = substr( $excerpt_initial, 0, $limit ) . ( strlen( $excerpt_initial ) > $limit ? '...' : '' ); } return '<p>' . $excerpt . '</p>'; } } function kleo_new_excerpt_length( $length ) { return 350; }
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Ticket solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.