-
AuthorPosts
-
September 10, 2014 at 9:18 pm #316912
Hi
is it possible to get longer preview text passages ?
In Grid Layout f.e. it´s not so much information for the users.Thanks, Oliver
September 10, 2014 at 10:26 pm #316966Hey Oliver!
Try adding this at the very end of your theme / child theme functions.php file:
add_filter('avf_postgrid_excerpt_length','avia_change_postgrid_excerpt_length', 10, 1); function avia_change_postgrid_excerpt_length($length) { $length = 100; return $length; }
Cheers!
JosueSeptember 13, 2014 at 10:35 pm #318640Hi
there is a syntax error then (Dreamweaver error message – and site is not loading after then)September 13, 2014 at 10:40 pm #318643Hi,
Can you please create me an administrator account? post it here as a private reply.
Regards,
JosueSeptember 13, 2014 at 10:57 pm #318655This reply has been marked as private.September 14, 2014 at 4:49 am #318741Hey!
Thank you for the update.
The snippet is working for the Grid Layout Blog and the Single Author, Big Preview Pic does work. You need to set the “Blog Content Length” to Excerpt. I created a test page: http://www.tennisgate.com/de/test-page/
Cheers!
IsmaelSeptember 14, 2014 at 10:29 am #318825This reply has been marked as private.September 14, 2014 at 12:02 pm #318839Struggling with the same problem, so kind of subscribing at this topic ;-)
Just found this plugin, maybe it solves @heufti65’s issue: http://wordpress.org/plugins/advanced-excerpt
What I want is the excerpt to be cut off where I’ve placed the
<!--more-->
code. Not at a certain number of characters/words/etc.September 14, 2014 at 3:04 pm #318868Hi!
Thanx, have the same problem, in Blog and category-overview the text as teaser should be till the <!–more–> Tag.
I solved this in earlyer with some code, but now that wont work any more:
What can I do?
Thanx!
Stefan
September 15, 2014 at 5:05 am #319002Hey!
Thank you for using Enfold.
Please add this on functions.php to show the excerpt on archive pages:
function change_blog_archive_style() { global $avia_config; if(!is_single()){ $avia_config['blog_content'] = "excerpt_read_more"; } } add_action('get_header', 'change_blog_archive_style');
Cheers!
IsmaelSeptember 15, 2014 at 11:44 am #319123This reply has been marked as private.September 20, 2014 at 9:45 am #322259Hey!
Please try this code instead – insert it at the bottom of your child theme functions.php or enfold/functions.php:
add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1); function avia_category_content_filter($current_post) { if(!is_single()) { global $more; $more = 0; $current_post['content'] = get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow"> →</span>'); } return $current_post; }
Regards,
PeterSeptember 20, 2014 at 11:30 am #322304Works like a charm for me!!!
Thnx @Dude!!!
MarcSeptember 20, 2014 at 11:42 am #322306And, the great thing is: this way all the HTML is shown in the excerpt of the blog page too! Things like a css class for the excerpt font, hyperlinks, etcetera. How cool is that? Neat stuff!
September 20, 2014 at 3:10 pm #322372Hey!
Great, glad the code worked for you :)
Best regards,
PeterSeptember 20, 2014 at 10:22 pm #322459This reply has been marked as private.September 21, 2014 at 10:48 pm #322706ok, number one above worked for me as well, thanx!!!
what is the difference between the two codes?
cause the answers are private.
thanx so much!
stefan
September 22, 2014 at 4:31 pm #323123Hey!
It uses the get_the_content() function and $more variable. This function can return a different text/output.
Cheers!
Peter -
AuthorPosts
- The topic ‘Length of description in preview’ is closed to new replies.