小编luc*_*zdj的帖子

如何在 php 页面中插入块代码?

我的网站中有这个 front-page.php 页面,我想直接在 php 页面中放置一个块代码。所以我有一个 div,我想把它放在那里。但代码就像

<!-- wp:latest-posts {"postsToShow":3,"displayPostContent":true,"excerptLength":30,"displayPostDate":true,"postLayout":"grid","displayFeaturedImage":true,"featuredImageSizeSlug":"large","align":"wide","className":"tw-mt-8 tw-img-ratio-3-2 tw-stretched-link is-style-default"} /-->
Run Code Online (Sandbox Code Playgroud)

它来自一个小部件。我无法让它工作,请帮忙:D

php wordpress wordpress-gutenberg gutenberg-blocks

2
推荐指数
1
解决办法
5261
查看次数