SpiceThemes Support Forum
Article section lenght
where could i modify the length of the summary of the article on my home-page?
Whatch on the bottom part of the site: gepal.eu
Add the read more tag from where you want to stop the article and show a read more button please follow given help article
Let me know if you have any confusion.
Ehy, thank u, it worked, but if i want to choose a default number of words after which wordpress put the tag automatically?
Because i don't wont different length of "last article box". I want all of them of the same size.
Ok its required some code customization please follow the instructions carefully.
As we know you are using the child theme already.
1. Find the code below and paste this in your child theme functions.php in the bottom.
$excerpt = get_the_content();
$excerpt = strip_tags(preg_replace(" (\[.*?\])",'',$excerpt));
$excerpt = strip_shortcodes($excerpt);
$original_len = strlen($excerpt);
$excerpt = mb_strimwidth($excerpt, 0, 145, "....");
$excerpt = $excerpt;
return $excerpt . '<a href="' . get_permalink() . '" class="more-link">'.__('Read More','spicepress').'</a>';
2. Now go to in your parent theme directory and copy index-news.php and paste in child theme directory.
3. Go to child theme directory >> index-news.php and find line number 63 and replace
<?php the_content(__('Read More','spicepress')); ?>
<?php echo spicepress_news_event_excerpt(); ?>
Hope this will work for you.
If you have any confusion please have a look in attached screenshot
Ok, u can close the ticcket! Thanks!
Nice to know that the issue has been solved. If there are any further query regarding to our theme, then, please feel free to post them.
If you like our theme and support can I ask you for a super review here
This discussion has been closed.