Hi,
I added the following lines provided by Ismael to my functions.php, to add excerpts to my magazine entries::
add_filter('avf_magazine_excerpt_length','avf_magazine_excerpt_new_lenght', 10, 1);
function avf_magazine_excerpt_new_lenght($excerpt) {
$excerpt = 200;
return $excerpt;
}
I also changed my magazine.php to add an “Read More” link per the following line of code provided by Josue:
if($excerpt)$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}<a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></div>";
I do not want the “Read More” link appearing right after the excerp, I want it to show up in a new line. How can I do it?
Kind Regards,
Chapdes
Hi chapdes!
Please try the following instead:
if($excerpt)$output .= "<div class='av-magazine-content entry-content' {$markupContent}>{$excerpt}<p><a href='".get_permalink($entry->ID)."' class='more-link'>".__('Read more','avia_framework')."<span class='more-link-arrow'>→</span></a></p></div>";
Regards,
Rikard
Thanks Rikard, the line of code really works.
Regards,
Chapdes