📜  wordpress 从 single.php 代码示例中添加块

📅  最后修改于: 2022-03-11 14:54:49.903000             🧑  作者: Mango

代码示例1
// GET a post or page with blocks or whatever and print it 
//on your single.php or other wp file 
$reuse_block = get_post( 123 ); // ID of the post
$reuse_block_content = apply_filters( 'the_content', $reuse_block->post_content);
echo $reuse_block_content;