Tagged: read more
Hello,
Your theme Rock !
I’ve noticed a problem about my category menus…
On my page, when i click on a menu it show the whole articles. I don’t want the whole articles, but just a “read more” option, like the traditionnal blog.
What should i do ?
Do i have to create a page for each category and configure it ? categories/tags would be useless then.
Or is there something i didn’t understand ?
Hi jyp42!
Thank you for using the theme!
Please add this on functions.php to change the archive content to summary or excerpt with a read more link:
add_filter('avf_blog_style','avia_change_archive_blog_layout', 10, 2);
function avia_change_archive_blog_layout($layout, $context){
if($context == 'archive') $layout = 'single-small';
return $layout;
}
add_filter( 'post-format-standard', 'avia_category_content_filter', 15, 1);
function avia_category_content_filter($current_post)
{
if(!is_single())
{
$current_post['content'] = get_the_excerpt();
$current_post['content'] .= '<div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"> →</span></a></div>';
}
return $current_post;
}
Cheers!
Ismael
Ouch !
Everything crashed, i don’t have access to my admin anymore….
Edit : works again, but i deleted the piece of code. Where exactly should i copy paste this code ?
Edit again : OK i did it, the exact file to modify is called functions-enfold.php , it works perfectly now, thanks :-)