Digital experiences for all disciplines
New Landing › How can we help? › Atelier › Add content preview excerpt to related posts
New Landing › How can we help? › Atelier › Add content preview excerpt to related posts
- This topic has 13 replies, 6 voices, and was last updated 8 years by Mohammad – SUPPORT.
-
Posted in: Atelier
-
August 19, 2015 at 2:36 pm #205388
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.
August 20, 2015 at 2:41 pm #205851Hi,
Can you provide us an example url so we can check?
Thanks-Rui
August 20, 2015 at 3:47 pm #205873August 21, 2015 at 3:04 pm #206232Hi,
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
August 21, 2015 at 3:26 pm #206248This reply has been marked as private.August 24, 2015 at 3:44 pm #206823Hi,
Apologies, just clarify do you mean “Related Products” or “Related Articles”.
Thanks,
David.August 24, 2015 at 4:08 pm #206835Ah 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.
August 25, 2015 at 12:56 pm #207210Sure, 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.August 25, 2015 at 1:19 pm #207241Hey 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.
August 25, 2015 at 2:11 pm #207286Hey,
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.February 12, 2016 at 12:37 am #248495Hi, any chance to modify this code to show an excerpt in recent posts sidebar widget?
February 12, 2016 at 9:29 am #248556Hi,
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
MohammadApril 5, 2016 at 2:53 am #259620This reply has been marked as private.April 5, 2016 at 8:08 am #259631Hi,
You really need to setup child theme to make any changes in theme.
Thanks
Mohammad -
Posted in: Atelier
You must be logged in and have valid license to reply to this topic.