WordPress:阻止主题样式的插件模板

时间:2019-02-03 22:06:26

标签: php wordpress

我正在使用WP-Invoice插件,并选择使用统一模板,因为它看起来更干净。

我的问题是它阻止了我的主题自定义样式。似乎统一模板会启动一个单独的主题,因此不会使用我的自定义主题或其任何样式/脚本

它不包含我的主题标题。当我将标题添加到模板时,它会显示,但由于没有包含样式而显得一团糟。

在这种情况下,我不知道我要寻找什么。

任何有关覆盖的帮助都将非常有用。

模板页面中的代码开头:

<?php
/**
* Unified Invoice Page template
*
* Displays Single invoice page
*/
global $invoice, $wpi_settings;
?><!DOCTYPE html>
<!--[if IE 6]>
<html id="ie6" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 7]>
<html id="ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html id="ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 6) & !(IE 7) & !(IE 8)]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo('charset'); ?>"/>
<meta name="viewport" content="width=device-width"/>
<title><?php
// Print the <title> tag based on what is being viewed.
global $page, $paged;

wp_title('|', true, 'right');

// Add the blog name.
bloginfo('name');

// Add the blog description for the home/front page.
$site_description = get_bloginfo('description', 'display');
if ($site_description && (is_home() || is_front_page()))
  echo " | $site_description";

?></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />  
<!--[if lt IE 9]>
<script src="http://cdnjs.com/libraries/html5shiv"></script>
<script src="https://cdnjs.com/libraries/respond.js"></script>
<![endif]-->

<script type="text/javascript">
jQuery(document).ready(function(){
  jQuery('body').unified_page_template();
});
</script>
</head>

<body class="inner-pages">

  <header class="pageheader">

    <div class="container">  

理想情况下,我希望所有页面都统一。

按现状显示,此页面未显示我的标准页眉或页脚。我试图将它们包括在内,但是没有运气。

如上所述,当我添加时:

<?php get_header(); 
get_template_part('index','banner'); ?>

它导入了我的标题,但显示不正确并破坏了模板。

此外,您还将看到它也导入了引导程序...我已将其包含在functions.php中。

当我从上面的代码中删除该调用时,引导程序不再起作用,因此它必须阻止了我的functions.php文件。

0 个答案:

没有答案
相关问题