Show Posts of categories in a Cornerstone Page

Hi!

I hope I can make myself clear, please ask, if you are confused.

I want to create a page with cornerstone, with layouted top, and underneath it I want to have posts of a certain category shown in the style of a blog. So title, featured image and some text until (…)

I have tried shortcodes, which only appear as text. Can#t seem to figure this out by myself and couldn’t find an older topic, that solved my problem.

Hi There,

Please try with the recent posts shortcode instead:

[recent_posts count="4"]

http://demo.theme.co/integrity-1/shortcodes/recent-posts/

Hope it helps :slight_smile:

Thanks that helped!
[recent_posts count=“4” orientation=“vertical” category=" … " type=“post”] is what I use now.

Is there a way though that I can see the content / Text of the post too, not only the featured image? So that People can scroll through without another click for reading. Classical Blog style.

Hello There,

If you want to add an excerpt to the recent post element, please check out this thread: https://theme.co/apex/forum/t/show-excerpt-in-recent-posts-widget/18296/5 or this thread: https://theme.co/apex/forum/t/recent-posts-show-excerpt/13934/2

Hope this helps.

hi,

thanks. I just want to have the full blog post displayed, no excerpt. I’m starting to give up though, if you dont have an answer to this I wont ask again. If that’ll be the case, thanks for getting me this far.

Hi @minosch,

I understand the frustration, but don’t give up :slight_smile: , you can do that :slight_smile:

May I know the code you implemented from the threads provided by @RueNel? The idea is having this line

$excerpt = apply_filters ( 'the_content', get_the_content() );

Example, find this line

$excerpt = ( $show_excerpt ) ? '<div class="x-recent-posts-excerpt"><p>' . preg_replace('/<a.*?more-link.*?<\/a>/', '', cs_get_excerpt_for_social() ) . '</p></div>' : '';

and replace it with the above line. And make sure you add it as shortcode in your builder’s text element instead of actual recent posts element.

Let me know :slight_smile: Thanks!

March 2021 Update: The above code example has been adjusted to account for a change to a function name.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.