Wordpress博客中的流氓

时间:2018-01-10 09:48:17

标签: php html css wordpress wordpress-theming

my Wordpress blog我遇到了一个奇怪的问题。

&nbsp标记后面插入

<body>。但是,&nbsp文件中没有header.php。这只是<body>标记,然后是<div>

有没有办法阻止这个?

提前致谢!

编辑|

这是header.php

<!DOCTYPE html>
<html class="no-js" <?php language_attributes(); ?>>
    <head>
        <meta charset="<?php bloginfo('charset'); ?>">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="profile" href="<?php echo esc_url( 'gmpg.org/xfn/11' ); ?>">
        <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

        <?php wp_head(); ?>
   </head>

   <body <?php body_class(); ?>>
      <div id="wrapper">

      <?php do_action('__before_header') ; ?>

      <?php hu_get_template_part('parts/header-main'); ?>

      <?php do_action('__after_header') ; ?>

      <div class="container" id="page">
          <div class="container-inner">
              <?php do_action('__before_main') ; ?>
              <div class="main">
                  <div class="main-inner group">
                      <?php do_action('__before_content') ; ?>

1 个答案:

答案 0 :(得分:2)

什么是&nbsp;

很好地解释了here

如何从html中删除&nbsp;

你应该找到html tags发生的beetwen,并删除那些标签之间的所有空格。

考虑对您的问题进行讨论:在body标记后,您获得了&nbsp;。因此,只需在{text} <body> header.phpchild主题的parent之后删除空格,即可停止呈现&nbsp;