Tagged: x
-
AuthorPosts
-
July 11, 2016 at 6:45 am #1081233
glenngtrParticipantHi there,
I have searched the forum quite intensively but couldn’t find a straight answer to my question. I’d like to have two news posts on the front page in two rows with an excerpt of two lines underneath. Could you help me in providing the code for this. Right now I got stuck with the following code:
[recent_posts count="2" no_image="true" enable_excerpt="true"]Thanks in advance!
July 11, 2016 at 7:21 am #1081258
DarshanaModeratorHi there,
Thanks for writing in! By default, our recent post shortcode do not support for excerpts. Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Once you setup your child theme and activate it, please follow this instructions (https://community.theme.co/forums/topic/show-excerpt-in-recent-posts-element-other-questions/#post-989700).
Hope that helps.
July 14, 2016 at 6:32 am #1086636
glenngtrParticipantThanks for the advice. I had already set up a child theme and customized the functions.php file. I have updated it with the code from you suggested link. However I’d like the news messages to show underneath each other instead of next to each other. Is there a shortcode to fix this? And still I am not seeing the excerpt.
Thank you.
July 14, 2016 at 8:22 am #1086766
DarshanaModeratorHi there,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
July 14, 2016 at 12:42 pm #1087163
glenngtrParticipantThis reply has been marked as private.July 14, 2016 at 10:22 pm #1087960
RadModeratorHi there,
Thanks, It’s working, I can see the excerpt. And please change this part of code
function custom_recent_posts() { remove_shortcode( 'x_recent_posts' ); add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_v2' ); }to this,
function custom_recent_posts() { remove_shortcode( 'x_recent_posts' ); remove_shortcode( 'recent_posts' ); add_shortcode( 'recent_posts', 'x_shortcode_recent_posts_v2' ); add_shortcode( 'x_recent_posts', 'x_shortcode_recent_posts_v2' ); }This post doesn’t have any excerpt http://veiligheid.plus/cornerstone-draft/ because it’s composed within cornerstone. With that, you should set your excerpt manually. Edit that post and click Screen options on the very top, then enable Excerpt. Then scroll that until you find the excerpt section and manually add you excerpt.
And make sure to add orientation as vertical to make each post in row. Eg.
[recent_posts ...... orientation="vertical"]Thanks!
Thanks!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1081233 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
