I have a weird problem with my Wordpress blog.
  is inserted right after the <body> tag. There's no   in the header.php file, though. It's just the <body> tag and then a <div>.
Is there any way to stop this?
Thanks in advance!
EDIT |
This is the 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') ; ?>
What is ?
It's good explained here
How to remove from html?
You should find beetwen which html tags it's occured and delete all spaces which are between that tags.
Considering discussion on your question: after body tag you got . So, just removing spaces after <body> from header.php of your wordpress child and parent themes stops rendering .
Related
I am starting with wordpress and after adding dynamic heading <?php wp_head(); ?> everything in the body disappears.
this is my header.php file
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset');?>">
<title><?php bloginfo('name');?> | <?php wp_title();?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php bloginfo('template_url'); ?>/css/bootstrap.css" rel="stylesheet">
<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet">
<?php wp_head(); ?>
</head>
When I remove the <?php wp_head(); ?> line, everything in the body shows. I am told that including the line is a must in wordpress.
On your header.php you have to call:
<?php wp_head(); ?>
On your internal pages, like index.php you have to call:
<?php get_header(); ?>
See:https://codex.wordpress.org/Theme_Development
Also you can turn your debug mode on in order to identify the errors.
https://codex.wordpress.org/Debugging_in_WordPress
How can i remove the <meta http-equiv="content-type" content="text/html; charset=utf-8" />
on this PHP Joomla Template? Because I have a Duplication of the Meta Tag from Joomla and from the Template :/ The Head.php file it is calling is:
<meta charset="<?php echo $this['system']->document->getCharset(); ?>">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<?php if($this['config']->get('responsive', true)): ?>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php endif; ?>
<?php if (isset($error)): ?>
<title><?php echo $error; ?> - <?php echo $title; ?></title>
<?php else: ?>
<jdoc:include type="head" />
<?php endif; ?>
and the Index.php is:
// get theme configuration
include($this['path']->path('layouts:theme.config.php'));
?>
<!DOCTYPE HTML>
<html lang="<?php echo $this['config']->get('language'); ?>" dir="<?php echo $this['config']->get('direction'); ?>" data-config='<?php echo $this['config']->get('body_config','{}'); ?>'>
<head>
<?php echo $this['template']->render('head'); ?>
</head>
<body class="<?php echo $this['config']->get('body_classes'); ?>">
here is an Image of this Problem:
Link to the Problem ( imgur )
If i understand your problem right. Do you want to remove the duplicate chartset?
Simple remove the first line in your first code sample.
And you can try $doc->setHtml5(true);in the index.php
I was just working with wordpress and managed to get my site up. Now i am getting this unnecessary header in my site (the black header ... right at the top), see below:
.
My header code looks like below:
<!doctype html>
<html <?php language_attributes(); ?> >
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title><?php bloginfo('name'); ?></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="style.css">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<header class="site-header">
<h1><?php bloginfo('name'); ?></h1>
<h5><?php bloginfo('description'); ?></h5>
<nav class="site-nav">
<?php
$args = array(
'theme_location' => 'primary'
);
?>
<?php wp_nav_menu($args); ?>
</nav>
</header>
I am new to workpress and just beginning to learn stuff.
How can i remove this header?
Thank you.
Wordpress shows this admin bar by default when you are logged in in the backend. Non-admin users will not see it, but you can disable this in your profile if you want.
Go to Users -> Your profile
Disable the option Show toolbar when viewing site
remove this line, the header will goes hide
<?php wp_head(); ?>
After hours of trying different things and codes, I came here to seek some help (I'm beginner in coding).
I'd like to put a full width and full height background image only in the header. The site is here: http://www.coveragenewstv.com/
Here is header.php :
<head>
<title><?php wp_title('|', true, 'right'); ?></title>
<meta charset="<?php bloginfo( 'charset' );?>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
wp_head(); /** we hook up in wp_booster #see td_wp_booster_functions::hook_wp_head */
?>
</head>
<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">
<?php //this is closing in the footer.php file ?>
<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>
<div id="td-outer-wrap">
<div class="td-transition-content-and-menu td-mobile-nav-wrap">
<?php locate_template('parts/menu-mobile.php', true);?>
</div>
<?php //this is closing in the footer.php file ?>
<div class="td-transition-content-and-menu td-content-wrap">
<?php
td_api_header_style::_helper_show_header();
do_action('td_wp_booster_after_header'); //used by unique articles
Add two code-blocks to the bottom of your css file:
.td-banner-wrap-full, .td-header-menu-wrap-full {
background-color: transparent;
}
and
.td-header-wrap.td-header-style-1 {
background-image: url(http://www.joomlaworks.net/images/demos/galleries/abstract/7.jpg);
background-size: cover;
}
Replace the url to your background image url.
See: Works fine
My head content(metas, scripts etc.) appears in the body tag. I have header php with this code
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta name="viewport" content="width=device=width">
<title<?php bloginfo('name'); ?></title>
<?php wp_head(); ?>
</head>
<header class="header">
<h1 id="logo">|||</h1>
<h4 id='title' ><?php the_title(); ?></h4>
</header>
<body>
and footer.php is closing it with this. `
<?php wp_footer(); ?>
</body>
</html>`
Already tried changing encoding from UTF-8 to UTF-8 without BOM using Notepad++, and still the same ,, this is my website if you wanna see with inspect [website]
website . Any ideas ? :S
Your html is broken:
<title> Name Lastname / Official Website</title>
^---- missing >