How to add the “page” post type to Recent Activity widget displayed in admin?

Add page post type to your code (tested): add_filter( ‘dashboard_recent_posts_query_args’, function(array $queryArgs) { $postTypes = get_post_types([ ‘public’ => true, ‘capability_type’ => ‘post’, ]); $postTypes[] = ‘page’; if ( is_array( $postTypes ) ) { $queryArgs[‘post_type’] = $postTypes; } return $queryArgs; }, 15 ); The reason your original code did not include pages is because pages have … Read more

Adding Blocks within Blocks

If you’re talking about nested Gutenberg blocks, you only need to add the InnerBlocks component. I think this is what you’re looking for : https://developer.wordpress.org/block-editor/how-to-guides/block-tutorial/nested-blocks-inner-blocks/ Here you have all the code you need and most of the use cases. Hope it helps !

HTML in excerpt WordPress 6.2.2

To get started, you’ll need to remove the wp_trim_excerpt function from the get_the_excerpt filter: remove_filter( ‘get_the_excerpt’, ‘wp_trim_excerpt’, 10 ); This will result in no auto-generation of excerpts (manually entered excerpts will still show). From here, add your own function and filter for generating the excerpt: function trim_excerpt_with_html( $text=””, $post = null ) { … } … Read more