首页 > 解决方案 > 在wordpress beaver builder中显示一个php页面

问题描述

我正在使用海狸生成器,我在 childe 主题文件夹“astra-child”中创建了一个文件夹“animate”,并制作了一些自定义代码来显示动画部分。

我想要的是在使用海狸生成器创建的页面中显示该动画部分。

我尝试了什么:

我尝试使用插件显示页面,即'Insert PHP Code Snippet' 我使用此代码创建了一个短代码,但它没有显示任何内容: <?php include(get_stylesheet_directory_uri(). '/animate/section/index.php'); ?>

我还尝试检查它是否正在呈现任何内容: <?php echo esc_url(get_stylesheet_directory_uri(). '/animate/section/index.php'); ?> 并且它正在呈现正确的 URL。

还尝试过: file_get_contents() 但这也没有显示任何内容。

任何人都可以帮忙吗?

标签: phpwordpress

解决方案


推荐阅读