Hi,
DW Social Feed is great plugin, but there is one big problem. I use Wall Classic theme and feeds are to long for category view. I tried different auto excerpt plugins but all of them damage the theme. Also, I tried to add excerpt filter to theme functions.php file but without success.
Is there a way to show excerpt instead of full post in category view? The best, if there is option to show excerpts for specified category(ies).
If you want to show all the content of your post on homepage, go to <wallpress>/home.php add this code after line 15
$wp_query->is_archive = false;
Hi Felikss,
If you want to trim down the length of post that was shown up on archive page, please go to `functions.php` of wallpress theme folder and add this following code:
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length' );
You can replace 20 by another option for your content length. Then, go to `content.php` at line 69, please replace
the_content();
by
the_excerpt();
Hope this helps!
Thank you Rambu, but this not solve my problem.
It damage my Quotes posts and it not respect my custom “more” setups in posts. I need excerpt function only for posts which coming from DW Social Feed plugin.
I tried your code and also I tried this
function custom_excerpt_length( $length ) {
if(in_category(393)) {
return 20;
} else {
return 200;
}
}
add_filter( ‘excerpt_length’, ‘custom_excerpt_length’ );
but without success.
Anyway – thank you for help!
In your content.php file, please edit line 66 to
<?php if ( is_search() || is_archive() || is_category(393) ) : ?>
And use excerpt_length filter normally.
Regards
Thanks again, Rambu!
almost good 🙂 excerpt in necessary category is good, but there is problems in main page (see image):
any ideas?
Thank you Rambu,
like always – works perfect! 🙂
Please login or Register to submit your answer