Skip to main content
9 events
when toggle format what by license comment
Jan 5, 2018 at 16:55 vote accept Per
Jan 5, 2018 at 16:37 comment added Nicolai Grossherr @PatJ I already had written your exact suggestion, before I remembered the restriction.
Jan 5, 2018 at 16:34 comment added Pat J @Nicolai Whoops, good catch.
Jan 5, 2018 at 16:33 comment added Nicolai Grossherr @Per My pleasure and anytime.
Jan 5, 2018 at 16:31 comment added Per Life savers. Thank you guys :) I managed to guess by just typing logical stuff that $recent["post_content"] got the content, but didn't manage to trim it. Hoped that $recent[post_excerpt"] worked, but no such luck ;) Thank your your help. both of you @PatJ and Nicolai
Jan 5, 2018 at 16:24 history edited Nicolai Grossherr CC BY-SA 3.0
added 89 characters in body
Jan 5, 2018 at 16:23 comment added Nicolai Grossherr @PatJ get_the_content doesn't take the ID, but he has the post_content already available
Jan 5, 2018 at 16:22 comment added Pat J Since you're outside The Loop, you might need to use wp_trim_words( get_the_content( $recent["ID"] ), 20 );.
Jan 5, 2018 at 16:17 history answered Nicolai Grossherr CC BY-SA 3.0