Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #453187

    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'>&rarr;</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

    #453622

    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'>&rarr;</span></a></p></div>";
    

    Regards,
    Rikard

    #454176

    Thanks Rikard, the line of code really works.

    Regards,

    Chapdes

    #454907

    Hey!

    Great, glad we could help :)

    Cheers!
    Rikard

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Show the Read More link in a new line in the Magazine Element’ is closed to new replies.