-
AuthorPosts
-
July 17, 2017 at 12:18 am #822239
I am building this site
I would like to limit the amount of copy that is supplied in the “blog preview” – is there a way to specifically limit it to certain color spaces, or will it effect the entire site wide?
Thank you in advance!
July 17, 2017 at 9:26 am #822409Hey dvus4l,
Sorry, but I don`t have sure about your question. Could you explain it with more details?
Best regards,
John TorvikJuly 17, 2017 at 7:05 pm #822822Hi John
For instance, in the top 4 featured blogs (not all posts have been filled in, but you can see there are two written out) – I would like to shorten the preview to potentially 100 characters max. Just the preview for the click through of the entire read.
Please let me know if that helps
Thank you
July 19, 2017 at 7:16 pm #824121Responding here as a solution has not been supplied – I am simply looking to shorten the “blog preview”
Thank you in advance
July 20, 2017 at 1:22 am #824273Hi,
Please add the following code on the functions.php file.
add_filter('avf_post_slider_entry_excerpt', 'avf_post_slider_entry_excerpt_mod', 10, 4); function avf_post_slider_entry_excerpt_mod($excp, $prep, $perm, $entry) { $excp = substr($excp, 0, 100); return $excp; }
Best regards,
IsmaelJuly 31, 2017 at 7:09 pm #832356Ismael,
Thank you for the help. Is there a way to add a … to the cut off text so people know that it is eluding to reading more in the actual post? Is there also a way to assure that it won’t cut a word off mid spelling? That seems a bit odd
Thank you in advance
July 31, 2017 at 7:46 pm #832372Ismael –
In addition to my response above, I have the top blog portions set to include a ‘read more’ link, however they’re not appearing now.
Assistance is greatly appreciated
August 5, 2017 at 4:47 am #834570Hi,
We would like to check the page again but it is password protected. Replace the filter in the functions.php file.
add_filter('avf_post_slider_entry_excerpt', 'avf_post_slider_entry_excerpt_mod', 10, 4); function avf_post_slider_entry_excerpt_mod($excp, $prep, $perm, $entry) { $excp = avia_limit_text($excp, 100); return $excp; } function avia_limit_text($text, $limit) { if (str_word_count($text, 0) > $limit) { $words = str_word_count($text, 2); $pos = array_keys($words); $text = substr($text, 0, $pos[$limit]) . '...'; } return $text; }
Best regards,
IsmaelAugust 7, 2017 at 7:29 pm #835568Log in supplied in private – please let me know if you have any luck
Thank you in advance
August 12, 2017 at 4:49 pm #837946Hi,
I have added Ismael’s code to your functions.php and the “read more” links are now showing.
Please clear your cache and review, you can adjust the except length to suit.Best regards,
Mike -
AuthorPosts
- You must be logged in to reply to this topic.