问题描述
在我的 wordpress 网站上,我有一个学习管理系统插件,我正在使用一个名为 Thrive Theme Builder 的主题构建器。
LMS 为用户创建仪表板页面 (dashboard.php)。问题是此页面忽略了我的所有主题,不显示我的主题页眉或页脚,并且布局不相同。
经过一番调查,我发现主题构建器(实际上是一个完整的主题)使用 single.php 文件来显示页面。显然 LMS 生成的页面没有。
这是主题singular.php文件中的代码
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package thrive-theme
*/
thrive_template()->render();
这是插件创建的dashboard.php页面的第一部分代码
<?php
get_header();
global $wp_query;
$dashboard_page_slug = '';
$dashboard_page_name = '';
if (isset($wp_query->query_vars['tutor_dashboard_page']) && $wp_query->query_vars['tutor_dashboard_page']) {
$dashboard_page_slug = $wp_query->query_vars['tutor_dashboard_page'];
$dashboard_page_name = $wp_query->query_vars['tutor_dashboard_page'];
有什么想法可以让它发挥作用吗?如何让dashboard.php 页面使用我的主题设置?
我已经尝试添加过盛世模板()->渲染();到dashboard.php 页面,但这会导致仪表板显示在我的主题和自身内部,非常奇怪。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)