Tagged: x
-
AuthorPosts
-
October 20, 2016 at 9:33 pm #1224860
Reid FParticipantI’d like to use the recent post shortcode to display a page instead of a post.
I’ve been looking at the function that was suggested in this forum thread:
https://community.theme.co/forums/topic/recent-post-shortcode-2/
They have the right idea but I can’t get it to work to pull up a page.
Is there a way this is possible?
Thanks
October 21, 2016 at 12:58 am #1225002
Rue NelModeratorHello There,
Thanks for writing in! You do not have to modify the recent post shortcode. You just need an add_filter() and you will be able to use the page in recent post element within Cornerstone. Since you already have your child theme active and ready, please insert this following code in your child theme’s functions.php file.
// Add page type to recent posts element // ============================================================================= function add_page_post_type( $types ) { $types['page'] = 'page'; return $types; } add_filter( 'cs_recent_posts_post_types', 'add_page_post_type' ); // =============================================================================And then edit your page in Cornerstone, insert recent posts element and you will have this: http://prntscr.com/cwz40g
Hope this helps.
October 21, 2016 at 11:14 am #1225595
Reid FParticipantThat is working great. How can I pull in a page by its page id? Right now it is just pulling in by the most recent published pages.
October 21, 2016 at 6:00 pm #1226005
FriechModeratorHi There,
Regretfully, further customizations from here would be getting into custom development, which is outside the scope of support we can offer. If you need more in depth changes, you may wish to consult with a developer. X is quite extensible with child themes, so there are plenty of possibilities.
Thanks for understanding.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1224860 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
