Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #189583

    Hello,
    I’d like to know the easiest way to show under the homepage slideshow not only the title and the featured image of the last posts but also a small excerpt from each post.
    I reckon I need to add a new div (below the title and the featured image themselves) and a call to the wordpress method in charge of showing a short summary of the post but I don’t know exactly where to start.

    The resulting summary (or excerpt) should appear in the same box of the featured image and the title (above the sliding bar)

    Thank you very much!

    #189891

    Hey matteora!

    Are you referring to this section?

    You can use this setting to do that:

    Cheers!
    Josue

    #190031

    Hi Josue!
    No, I’m referring to the main slideshow (the first one in the top part of the homepage), that’s composed by a series of posts (showed by their featured image) and above them the big version of the featured image, sliding according to the small preview clicked by the user.
    I’d like to have not only the small preview of the featured image but also a brief excerpt of the post: is it possible?
    I hope I’ve explained better this time: if not please tell me how I can attach an image and I’ll show you the exact part I’m talking about

    Thank you

    #190110

    Hi!

    Open /includes/helper-featured-posts.php and go to line 78:

    $thumbnail .= "<strong>".get_the_title()."</strong>";
    

    Add this below it:

    $thumbnail .= "<div>".avia_excerpt(150)."</div>";
    

    Final code:

    $thumbnail .= "<strong>".get_the_title()."</strong>";
    $thumbnail .= "<div>".avia_excerpt(150)."</div>";
    

    Best regards,
    Josue

    #190552

    Thx Josue,
    so the (150) is the number of chars, right?
    Is there a way to change the font and its properties (size, spacing, etc…) of the excerpt shown according to your directives?

    #190685

    Hey!

    Yes 150 is the number of characters, regarding formatting it, you’d need to change the code to something like:

    $thumbnail .= "<div class='custom_excerpt'>".avia_excerpt(150)."</div>";
    

    Then with CSS:

    .custom_excerpt{
    font-size: 11px;
    line-height: 14px;
    }

    Cheers!
    Josue

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.