Can I dynamically output a list of 3 recent posts into default text in Wordpress editor?
问题 I was hoping someone could help me learn how to achieve this. My idea is to generate a list of 3 recent posts from a category (top posts) as a default text in the wordpress editor. I looked at several solutions to achieve something similar and kind of mixed them into the code below, but it doesn't seem to work. add_filter('default_content', 'tp4567_default_list'); function tp4567_default_list( $content ) { $content = new WP_Query( 'cat=2&posts_per_page=3' ); return $content; } Is there any