New Landing How can we help? Atelier Add content preview excerpt to related posts

Viewing 14 posts - 1 through 14 (of 14 total)
  • Posted in: Atelier
  • #205388
    GTS75
    Member
    Post count: 240

    Is it possible to have the post excerpt display under the Related Products thumbnails? Currently at the bottom of my blog posts where the related products are shown it only shows the title and the author…and there’s only one author for my blog and showing the excerpt is much more valuable to me than showing the author name. Is there a way to control that? Or is there another workaround like using page elements to build what I’m talking about? Much appreciated guys. Thanks.

    #205851
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you provide us an example url so we can check?
    Thanks

    -Rui

    #205873
    GTS75
    Member
    Post count: 240
    #206232
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Is it your site being used live?
    Is it possible to provide ftp access and admin access to WordPress so I can try some changes in the code?

    -Rui

    #206248
    GTS75
    Member
    Post count: 240
    This reply has been marked as private.
    #206823
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Apologies, just clarify do you mean “Related Products” or “Related Articles”.

    Thanks,
    David.

    #206835
    GTS75
    Member
    Post count: 240

    Ah crap sorry guys. I meant related articles. You can see them at the bottom of the link I provided. It shows the thumbnail and the author, but I’d like for it to not display the author (since there’s only one for all of them) and display the custom excerpt.

    #207210
    David Martin – Support
    Moderator
    Post count: 20834

    Sure, no problem.

    Can you please add this PHP to your child theme functions.php file.

    
    function sf_child_atelier_related_articles_excerpt_length() {
        return 20;
    }
    add_filter('sf_related_articles_excerpt_length', 'sf_child_atelier_related_articles_excerpt_length', 30);

    Thanks,
    David.

    #207241
    GTS75
    Member
    Post count: 240

    Hey David – I noticed that I have a child theme from when I used the Neighborhood theme..but I don’t see a child theme listed for Atelier. What’s the easiest way to create one and then add that PHP? Rookie over here when it comes to that kind of thing.

    Thanks in advance.

    #207286
    David Martin – Support
    Moderator
    Post count: 20834

    Hey,

    If you head to your TF account and download the main zip folder it will contain one, then simply upload it and activate it.

    Thanks,
    David.

    #248495
    JackV
    Member
    Post count: 60

    Hi, any chance to modify this code to show an excerpt in recent posts sidebar widget?

    #248556
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit widget-posts.php file at /atelier/swift-frameowork/widgets/.

    Find this code:-
    <span><?php printf( __( 'By %1$s on %2$s', 'swiftframework' ), $post_author, $post_date ); ?></span>

    Change to:-

    $post_excerpt   = strip_shortcodes( get_the_excerpt() );
    <div class="excerpt" ><?php echo $post_excerpt; ?></div>
    <span><?php printf( __( 'By %1$s on %2$s', 'swiftframework' ), $post_author, $post_date ); ?></span>

    Thanks
    Mohammad

    #259620
    cfairi
    Member
    Post count: 129
    This reply has been marked as private.
    #259631
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    You really need to setup child theme to make any changes in theme.
    Thanks
    Mohammad

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

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register