php - 在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() 但这也没有显示任何内容。
任何人都可以帮忙吗?
解决方案
推荐阅读
- wordpress - 在主题选项中使用容器分隔字段数组(碳字段)
- javascript - Javascript检测悬停是在元素的底部还是顶部填充
- javascript - 是否可以在 PM2 日志中插入字符串?
- javascript - jquery/ajax加载href onClick获取多个链接
- macos - 无法在 Mac OS High Sierra 上安装 VirtualBox
- python - 进入全屏时屏幕大小不更新
- terraform - Terraform 计划打印敏感信息
- c# - 在 SQL 中加密和在 C# 中解密
- forms - 表单数据和文件未上传到 Google 电子表格?
- mongodb - 不在 PyMongo 中工作,但在 mongo shell 中工作