Parent pages not display on Wordpress site - php

I have made three pages on the back end of Wordpress (Work, Studio, CTHM+) but they don't seem to appear on the front end of the site:
http://www.cthm.co.uk/work/
The header.php file has been edited but I'm not sure if I am missing something vital.
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* #package WordPress
* #subpackage Twenty_Twelve
* #since Twenty Twelve 1.0
*/
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
<script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="http://www.cthm.co.uk/wp-content/themes/child/scripts/jquery.coda-slider-2.0.js"></script>
<script type="text/javascript">
$().ready(function() {
$(".slider1").codaSlider({dynamicArrows: false, dynamicTabs: false} );
$(".slider1 .coda-nav-right-wrapper").mouseover(function(){ $(".nav1").css("display", "block"); });
$(".slider1 .coda-nav-right-wrapper").mouseout(function(){ $(".nav1").css("display", "none"); });
$("#coda-nav-right-1 > a > .coda-nav-right-wrapper")
});
</script>
</head>
<body>
<div id="header">
<h1>
<a href="http://www.cthm.co.uk/work">
<img src="http://www.cthm.co.uk/wp-content/uploads/2013/02/logo2.png" alt="CTHM Logo" id="logo" width="140" height="44" />
</a>
<div id="contact-details">
26 Queen Anne Road, <br />
London, E9 7AH<br />
hello#cthm.co.uk
</div>
</h1>
</div>
<div id="content">

Your header is showing but your code is wrong. You need to add your script inside of a no conflict wrapper for it to work properly. And if you are going to add any type of javascript I would consider adding it to the functions.php section so that it enqueue's appropriately.
Reference: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Link_a_Theme_Script_Which_Depends_on_jQuery
How to enqueue script: http://codex.wordpress.org/Function_Reference/wp_enqueue_script
Also if you plan to make a ton of changes to the twenty twelve theme, I would also consider understanding how to create a child theme based on the twenty twelve theme
http://codex.wordpress.org/Child_Themes

Related

WordPress Page Template Remove Sidebar

Using a child theme version of Ambition. For some reason the sidebar is displaying at the bottom. How do I edit the child theme or page template to make the sidebar not display.
Here is the link to the live example: http://businessblessed.com/specialoffers/sales-pages/
Here is the page template code:
<?php
/*
Template Name: SQ w Img 2step
*/
?>
<?php
/**
* This file displays page with no sidebar.
*
* #package Theme Horse
* #subpackage Ambition
* #since Ambition 1.0
*/
?>
<!DOCTYPE html>
<!--[if IE 7 ]> <html lang="cs" class="ie7 no-js"> <![endif]-->
<!--[if IE 8 ]> <html lang="cs" class="ie8 no-js"> <![endif]-->
<!--[if IE 9 ]> <html lang="cs" class="ie9 no-js"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="cs" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; minimum-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
<title>GiveAway</title>
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,400italic,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/css/style.css?v=1" media="screen, projection" />
<link rel="stylesheet" href="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/css/print.css?v=1" media="print" />
<link rel="shortcut icon" href="./favicon.ico" />
<script>document.documentElement.className = document.documentElement.className.replace('no-js', 'js');</script>
</head>
<body class="page-subpage">
<div id="main">
<div class="row-main">
<div class="col col-book">
<img src="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/img/book.png" alt="book" />
</div>
<div class="col col-content">
<div class="in">
<p class="read-this"><?php single_post_title(); ?></p>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php the_content( ); ?>
<?php endwhile; else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>​
</div>
</form>
<p class="secure">Your Information is 100% Secure And Will Never Be Shared With Anyone.</p>
<p class="legal">Legal Information</p>
</div>
</div>
</div>
</div>
<!--[if lte IE 8 ]>
<img src="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/img/bg.jpg" alt="" class="bg-ie" />
<![endif]-->
<script src="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/js/jquery.js?v=1"></script>
<script src="http://businessblessed.com/wp-content/themes/virtue-child/squeeze-page-w-prodImage-2step-optin/js/app.js?v=1"></script>
<script>
App.run({})
</script>
</body>
</html>
I also found a "no sidebar" template inside the parent theme, but I am not sure if it can be applied.
<?php
/**
* This file displays page with no sidebar.
*
* #package Theme Horse
* #subpackage Ambition
* #since Ambition 1.0
*/
?>
<?php
/**
* ambition_before_loop_content
*
* HOOKED_FUNCTION_NAME PRIORITY
*
* ambition_loop_before 10
*/
do_action( 'ambition_before_loop_content' );
/**
* ambition_loop_content
*
* HOOKED_FUNCTION_NAME PRIORITY
*
* ambition_theloop 10
*/
do_action( 'ambition_loop_content' );
/**
* ambition_after_loop_content
*
* HOOKED_FUNCTION_NAME PRIORITY
*
* ambition_next_previous 5
* ambition_loop_after 10
*/
do_action( 'ambition_after_loop_content' );
?>
Debug the_content()
var_dump(the_content()); and check for sidebar data,
Also You are doing wrong, Only the data after the body you have to write in template file.
Every WordPress theme provides page template with sidebar as well as no sidebar.
Here you can easily use the page template with no sidebar by copying it in your sidebar for your purpose and this will be the right way.
Normally WordPress uses get_sidebar() function to display sidebar so check and remove it from your template or can work with hooks like:
If added to a child theme's functions.php file, this will remove the footer sidebars registered by the TwentyTen theme.
function remove_some_widgets(){
// Unregister some of the TwentyTen sidebars
unregister_sidebar( 'first-footer-widget-area' );
unregister_sidebar( 'second-footer-widget-area' );
}
add_action( 'widgets_init', 'remove_some_widgets', 11 );
If this doesn't work then you can simply hide the sidebar using css by taking the body class within so that the sidebar will be hidden for only specific page for example:
.sales_page aside {
display : none;
}
But surely this should be the last option.

IE8 & Respond.js - Included Dynamic CSS Not Applying

I'm having some trouble with IE8 recognising some CSS that is generated from a PHP file and then included in my sites header. This CSS works perfectly in all other browsers I've tested but it simply won't apply in IE8.
If I move the dynamic CSS into my main css files - it works fine.
By dynamic, I mean the the CSS is generated from PHP. I'm already using respond.js to enable media queries in IE8 which is working because if I put this CSS in my main file - the CSS works.
However, if I put non-media query styles in the same file - it does apply. So this must be an issue with respond.js not seeing that responsive CSS.
When I 'View Source' the file has definitely included as it's printed in there but for some reason IE8 won't apply the styles. It doesn't show in Developer Tools.
Basically, the CSS should display a black menu bar at the top of the page when the browser window is narrower than 782 pixels.
You can see the full thing at: http://sandbox.benpalmer.me/flow/test/
The head of my document looks like this (this is a Wordpress theme/template):
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 <?php if($theme_settings['modernizr-version'] != 'none'): echo 'no-js'; endif; ?>"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8 <?php if($theme_settings['modernizr-version'] != 'none'): echo 'no-js'; endif; ?>"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9 <?php if($theme_settings['modernizr-version'] != 'none'): echo 'no-js'; endif; ?>"> <![endif]-->
<!--[if IE 9]> <html class="no-js lt-ie10 <?php if($theme_settings['modernizr-version'] != 'none'): echo 'no-js'; endif; ?>"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="<?php if($theme_settings['modernizr-version'] != 'none'): echo 'no-js'; endif; ?>"> <!--<![endif]-->
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title><?php wp_title( '|', true, 'right' ) . bloginfo('name'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <?php
wp_head();
include(locate_template('assets/css/dynamic.css.php')); ?>
<!--[if lt IE 9]> <?php
if($theme_settings['modernizr-version'] == 'none'): ?><script type="text/javascript" src="<?php echo get_template_directory_uri() ?>/assets/js/vendor/modernizr.min.js"></script><?php endif; ?>
<script type="text/javascript" src="<?php echo get_template_directory_uri() ?>/assets/js/vendor/selectivzr.min.js"></script>
<script type="text/javascript" src="<?php echo get_template_directory_uri() ?>/assets/js/vendor/respond.js"></script>
<![endif]-->
</head>
<body <?php body_class(); ?>>
The include(locate_template('assets/css/dynamic.css.php')); file that is being included is set up like this:
<?php
/*
| --------------------------------------------------------------------
| Primary Navigation
| --------------------------------------------------------------------
*/
/* Breakpoint
| -------------------------------------------------------------------- */ ?>
<style type="text/css">
#media all and (max-width: <?php echo get_theme_mod('nav-primary-breakpoint', '782px'); ?>) {
#wrapper {
margin-top: 42px;
}
.admin-bar #wrapper {
margin-top: 88px;
}
#mobile-header {
display: block;
}
#menu-primary {
display: none;
}
.drawer {
margin-top: 42px;
padding-top: 42px;
top: -42px;
}
}
</style>
This one has me stumped - I've been Googling for an hour which brought up suggestions of changing my DOCTYPE, making sure my comments are ended properly etc but nothing has worked so far.
I suppose that by "dynamic CSS" you mean CSS media queries. If so, the answer is very simple:
IE8 does not support media queries.
There are some JS polyfills that solve the issue, the most famous one is perhaps respond.js.
EDIT
From the discussion in comments: It seems that the issue is caused by the fact, that Respond.js can read CSS from linked stylesheets only, not from inlined CSS.

Wordpress:Display A specific Header for a Page

I have been trying To have No header for My Landing Page,but a sticky nav Bar On the header for the rest of my pages.
I edited the header(header.php),but it gets applied to all the pages.I would like The header To not show on the landing page.
Here is my code.
<?php
/*
* Header Section of Iconic One
*
* Displays all of the <head> section and everything up till <div id="main">
*
* #package WordPress - Themonic Framework
* #subpackage Iconic_One
* #since Iconic One 1.0
* /
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
<html class="ie ie8" <?php language_attributes(); ?>>
<![endif]-->
<!--[if !(IE 7) | !(IE 8) ]><!-->
<html <?php language_attributes(); ?>>
<!--<![endif]-->
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
<![endif]-->
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<?php if ( get_theme_mod( 'themonic_logo' ) ) : ?>
<div class="themonic-logo">
<img src="<?php echo get_theme_mod( 'themonic_logo' ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</div>
<?php if( get_theme_mod( 'iconic_one_social_activate' ) == '1') { ?>
<div class="socialmedia">
<img src="<?php echo get_template_directory_uri(); ?>/img/twitter.png" alt="Follow us on Twitter"/> <img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/> <img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Subscribe RSS"/>
</div>
<?php } ?>
<?php else : ?>
<hgroup>
<?php bloginfo( 'name' ); ?>
<br .../> <a class="site-description"><?php bloginfo( 'description' ); ?></a>
</hgroup>
<?php if( get_theme_mod( 'iconic_one_social_activate' ) == '1') { ?>
<div class="socialmedia">
<img src="<?php echo get_template_directory_uri(); ?>/img/twitter.png" alt="Follow us on Twitter"/> <img src="<?php echo get_template_directory_uri(); ?>/img/facebook.png" alt="Follow us on Facebook"/> <img src="<?php echo get_template_directory_uri(); ?>/img/gplus.png" alt="Follow us on Google Plus"/><img src="<?php echo get_template_directory_uri(); ?>/img/rss.png" alt="Follow us on rss"/>
</div>
<?php } ?>
<?php endif; ?>
<div class="clear"></div>
</header><!-- #masthead -->
<div id="main" class="wrapper">
I have removed The nav bar on this File,But i wish to use the nav bar on all my other pages.
I tried the IS page() function,but it Does not work,for me at least.Could someone provide an example on how this should be done
You need to create static "template page",
your first one would be your home page.
<?php /* Template Name: Homepage */?>
<?php get_header();?>
-- BODY HERE --
<?php get_footer();?>
Now you create how many pages you got like this, Home, About, Service, Profile, Contact.
Now you don't need a template for every single page but it wouldn't hurt I would recommend doing that.
Finally to get the different header for other page you just create a different header-other.php and use it instead of the header.php....
Make sure you use -name.php because you will call it like this on the page you want.
<?php get_header('name');?>
so anything past the - you put in here and WordPress will know that you are trying to use that HEADER.
I hope this helps and solves all your issues, best of luck with your project.

PHP Includes and Require not working

I know this question has been asked before, but even after reading other posts I can't figure out whats going on...
Please have a look at my code structure and see what am I doing wrong..
Folder structure:
index.php
(FOLDER - Includes) header.php
(FOLDER - browse) blog.php , ecommerce.php, other.php
(FOLDER - core) init.php
I'm trying to include Header.php from includes folder in blog.php in browse folder. Below is my header.php code.
Header file located in Includes folder
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
<!-- Basic Page Needs
================================================== -->
<meta charset="utf-8">
<title>Web Awwards | Web Gallery | Submit your site</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Mobile Specific Metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<link rel="stylesheet" type="text/css" href="../css/base.css">
<link rel="stylesheet" type="text/css" href="../css/skeleton.css">
<link rel="stylesheet" type="text/css" href="../css/layout.css">
<link rel="stylesheet" type="text/css" href="../css/styles.css">
<link rel="stylesheet" type="text/css" href="../css/menu.css">
<link rel="stylesheet" type="text/css" href="../css/submission.css">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Favicons
================================================== -->
<link rel="shortcut icon" href="images/favicon.ico">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/apple-touch-icon-114x114.png">
</head>
<body>
<?php
require_once('core/init.php');
?>
<!-- Menu Horizontal -->
<div class="horizontal">
<div class="webName">
and Browse folder blog.php file code:
<?php
include './includes/header.php';
?>
<!-- TODO PHP Scripts -->
<div class="category nine columns">
<div class="category-img">
<img src="css/img/webImg/screen1.png" alt="Site Description"/>
</div>
<h3> Web Name </h3>
<h5> Designed By: Tautvydas Slegaitis </h5>
<h7> Designers url </h7>
<div class="vote">
<h4> Vote for my site </h4>
</br>
Love it
Nope, Not for me
</div>
</div>
</div><!-- Close Container Div -->
<div class="footer">
</div>
</body>
</html>
But it is not working. I dont know why,... Please please help me sort this out its killing me for the past 2 days. Coda 2 is showing me an error
" Warning: include(./includes/header.php): failed to open stream: No such file or directory in - on line 2 Warning: include(): Failed opening './includes/header.php' for inclusion (include_path='.:') in - on line 2 "
init.php code:
<?php
session_start();
$GLOBALS['config'] = array(
'mysql' => array(
'host' => 'localhost',
'username' => 'root',
'password' => 'root',
'db' => 'webAwwards'
),
'remember' => array(
'cookie_name' => 'hash',
'cookie_expire' => 604800
),
'session' => array(
'session_name' => 'user'
)
);
// TODO Remove parenthesis in require once if doesnt work
spl_autoload_register(function($class) {
require_once('classes/' . $class . '.php');
});
require_once('/functions/sanitise.php');
?>
try :
include('../test/header.php');
it works fine in me.
Edit: and if not on your case, try to correct the path of your init.php:
require_once('../core/init.php');
You could try something like:
include $_SERVER['DOCUMENT_ROOT'] .'*/project_name_if_needed*/test/header/';
I don't know if this is recommended, so use with caution.
I had the same issue and finally discovered that OVH deactivates the option allow_url_include on their shared web servers by default. This is a general setting that can not be changed.
The solution is to use something like
require ($_SERVER['DOCUMENT_ROOT'].'/wp-config.php');
as Lucas said.

new DomDocument() do not work with getElementsByTagName('section'); [duplicate]

This question already has answers here:
PHP DOMDocument error handling
(5 answers)
Closed 9 years ago.
I would like to have different outputs if the file is called by Ajax or not.
For that I have this code witch works fine:
/* AJAX check */
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
$content = get_content();
die($content);
}
my function for filtering the contend is this:
function get_content(){
//$file = file_get_contents('index.html'); //works better but i get only errors
$dom = new DomDocument();
$dom->loadHTML($_SERVER['REQUEST_URI']); //or $file
$section= $dom->getElementsByTagName('section');
return $section->item(0)->nodeValue;
}
my output is always empty.
Whats wrong here?
!!!I'am not looking for DOMDocument error handling!!!!
What I do for now is:
/* decide what the content should be up here .... */
/* AJAX check */
if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
/* if ajax, show only content of the section tag */
$file = file_get_contents($_SERVER['SCRIPT_FILENAME']);
$section = preg_replace("/.*<section[^>]*>|<\/section>.*/si", "", $file);
die($section);
}
/* not ajax, show page.... */
and it seems to work. I do not know it is the best solution because somewhere in this forum I read that its better to realise that with DomDocument().
Any suggestions are welcome?
Here is the html-file:
<!doctype html>
<!-- Determine browser JS free -->
<!-- HTML5 Mobile Boilerplate -->
<!--[if IEMobile 7]><html class="no-js iem7"><![endif]-->
<!--[if (gt IEMobile 7)|!(IEMobile)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<!-- HTML5 Boilerplate -->
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<link rel="shortcut icon" href="img/base/favicon.html" />
<link rel="apple-touch-icon-precomposed" href="img/base/apple-touch-icon-57x57-precomposed.html" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="img/base/apple-touch-icon-72x72-precomposed.html" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="img/base/apple-touch-icon-114x114-precomposed.html" />
<script src="/js/libs/modernizr.custom.js"></script>
<!--[if (IE 7)]>
<link rel="stylesheet" href="/css/fallback/icons-ie7.css">
<![endif]-->
</head>
<body >
<section role="main">
<header class="hero-banner">
<img class="resize" src="/img/base/spacer-hero.png" rel="/img/designers/banners/cloe-banner3.jpg" alt="Cloe" />
<noscript><img src="/img/designers/banners/cloe-banner3.jpg" alt="Cloe" /></noscript>
<hgroup>
<h1>Claudia</h1>
<h2 class="text-hl">Designerin</h2>
</hgroup>
</header>
</section>
<footer role="contentinfo">
<p><small>©2013 joe</small></p>
<p><small>Our website uses delicious cookies to improve your experience. We'll assume you're ok with that.</small></p>
</footer>
<!-- jQuery from Google's CDN with local fallback -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/libs/jquery-1.8.3.min.js"><\/script>')</script>
<script src="/js/libs/wfl.js"></script>
<!-- Initialises scripts from plugins.js and helper.js -->
<script src="/js/script.js"></script>
<!-- Google Goggles -->
</body>
</html>
You can turn the errors of by setting internal errors to true:
$doc = new DOMDocument;
$before = libxml_use_internal_errors(true);
$doc->loadHTML($html);
libxml_use_internal_errors($before);
You then won't have the errors logged any longer. In your case most likely you've got display errors enabled which might be okay for development, but on your production server, please switch to error logging otherwise your website would reveal too much data to the outside.
See as well:
PHP DOMDocument error handling

Categories