Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #291255

    Hi, how can I display read more links in the portfolio grid under the text excerpts?

    Thanks, Richard

    #291388

    Hey Richard!

    Thank you for using the theme.

    Please edit config-templatebuilder > avia-shortcodes > portfolio.php, find this code on line 471:

    $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".$excerpt."</div>" : '';
    

    Replace it with this:

    
    					$readmore = '<br /><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span></a></div>';
                        $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".$excerpt.$readmore."</div>" : '';

    Best regards,
    Ismael

    #291510

    Thanks Ismael,

    What would be the best way for me to make this change, as I’m using a child theme, and would like to do it so I don’t touch the underlying Enfold theme?

    Thanks, Richard

    #291767
    This reply has been marked as private.
    #291820
    This reply has been marked as private.
    #292408

    Please, is there a way to add ‘read more’ links under portfolio grid items without breaking the layout?

    Thanks, Richard

    #292489

    This is the modified section of portfolio.php with your suggested change to add the ‘read more’ link. Something is breaking the portfolio items in the portfolio grid when adding this modification:

    if(!empty($title))
    {
    $markup = avia_markup_helper(array(‘context’ => ‘entry_title’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup));
    $output .= ‘<header class=”entry-content-header”>’;
    $output .= “<h3 class=’grid-entry-title entry-title’ $markup>“.$title.”</h3>”;
    $output .= ‘</header>’;
    }
    $readmore = ‘<br />‘.__(‘Read more’,’avia_framework’).'<span class=”more-link-arrow”> →</span></div>’;
    $output .= !empty($excerpt) ? “<div class=’grid-entry-excerpt entry-content’ “.avia_markup_helper(array(‘context’=>’entry_content’,’echo’=>false, ‘id’=>$the_id, ‘custom_markup’=>$custom_markup)).”>”.$excerpt.$readmore.”</div>” : ”;
    $output .= !empty($title) || !empty($excerpt) ? “</div>” : ”;
    $output .= ‘<footer class=”entry-footer”></footer>’;
    $output .= “</article>”;
    $output .= “</div>”;

    #292494

    Hey Richard!

    Can we see how it looks when you add the code Ismael provided?

    Cheers!
    Yigit

    #292501
    This reply has been marked as private.
    #292507
    This reply has been marked as private.
    #292511

    Hey!

    Do you mind creating a temporary admin login and posting it here privately? I cannot reproduce the same issue on my local insallation and seems like custom CSS will not help.

    Regards,
    Yigit

    #292518
    This reply has been marked as private.
    #292833

    Hi!

    Thank you for the update.

    I made a mistake of adding a closing div. Please use this instead:

    $readmore = '<br /><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow">  &rarr;</span></a>';
                        $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".$excerpt.$readmore."</div>" : '';
    

    Best regards,
    Ismael

    #292903

    This is great!

    How can I add an additional line of space between the excerpt text and ‘Read more’?

    Also, how can I change ‘Read more’ to ‘read more’ and remove the arrow?

    Thanks, Richard

    BTW, you guys rock! And I’m recommending Enfold to all my colleagues

    #292916

    Hey!

    Please change the code Ismael posted to following one

    `
    
    $readmore = '<br /><br /><a href="'.get_permalink($the_id).'" class="more-link">'.__('read more','avia_framework').'</a>';
                        $output .= !empty($excerpt) ? "<div class='grid-entry-excerpt entry-content' ".avia_markup_helper(array('context'=>'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup)).">".$excerpt.$readmore."</div>" : '';
    
    
    `

    Best regards,
    Yigit

    #292920

    That’s fantastic, thanks Yigit

    #292922

    Hey!

    You are welcome. Glad Ismael could help :)

    Best regards,
    Yigit

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘read more link in portfolio grid’ is closed to new replies.