Tagged: x
-
AuthorPosts
-
August 22, 2016 at 3:58 am #1141149
bartvanoersParticipantHey guys, I’d like to show a read more button underneath the recent posts in the recent posts shortcode. I already managed to show the exerpt. I found a few posts regarding this issue, but I couldn’t find a solution.
You can view the site here.
I’d like something like in the attached image.
Can this be done?
Thanks!
August 22, 2016 at 4:06 am #1141157
ChristianModeratorHey there,
Regretfully this isn’t a feature offered by X. It could be possible with custom development, but this would be outside the scope of support we can offer. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/.
Here’s a quick tip though, check out the file
plugins\cornerstone\includes\shortcodes\recent-posts.phpand uncomment the commented lines to enable the excerpt which includes the read more link. Please take note that it is a feature that we do not support yet so any issue arising from the use of it is outside the scope of our support.Thanks for understanding. Take care!
August 22, 2016 at 4:41 am #1141205
bartvanoersParticipantThanks for the quick reply!
August 22, 2016 at 5:09 am #1141235
ThaiModeratorIf you need anything else please let us know.
August 22, 2016 at 5:25 am #1141255
bartvanoersParticipantI’m almost there with my “awesome” PHP skills 🙂
Added this to the recent-posts.php:
$output .= '<a class="x-recent-post' . $count . ' ' . $image_output_class . '" href="' . get_permalink( get_the_ID() ) . '" title="' . esc_attr( sprintf( __( 'Permalink to: "%s"', 'cornerstone' ), the_title_attribute( 'echo=0' ) ) ) . '">' . '<article id="post-' . get_the_ID() . '" class="' . implode( ' ', get_post_class() ) . '">' . '<div class="entry-wrap">' . $image_output . '<div class="x-recent-posts-content">' . '<h3 class="h-recent-posts">' . get_the_title() . '</h3>' . '<span class="x-recent-posts-date">' . get_the_date() . '</span>' //////////////////////////////////////// . $excerpt ///////////////////////////////////////// . '</div>' . '<p>[x_button shape="square" size="large" float="none" info="none" info_place="top" info_trigger="hover" class="btn-aqua" href="' . get_permalink( get_the_ID() ) . '""]Read more[/x_button]</p>' . '</div>' . '</article>' . '</a>';but now the posts show one per row, not 3 as before (working locally, so see img). Could you maybe help me with that?
August 22, 2016 at 5:28 am #1141257
bartvanoersParticipantAlso, when Cornerstone gets an update, will I lose the changes? How can I prevent that?
August 22, 2016 at 5:31 am #1141259
ChristianModeratorWe’re sorry but we could not support any issues arising from this custom development. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/
Yes, your modifications will be lost if you’re modifying plugin files. To prevent that, you will need to override the function in your functions.php. That however would fall outside the scope of our support. Either way isn’t advisable though as update changes might break your site. The best way is to create your own custom element. See https://community.theme.co/kb/cornerstone-custom-elements/
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1141149 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
