what does your header.php file look like? can you share it on pastebin?
can you see this? Click on the underlined text
thanks for your answer
best
i dont think that was your header.php file. that didnt even look like PHP. the error says there is a warning on a certain line of your header.php file. that is what we would have to look at
try this instead?
http://pastebin.com/EnA5R6d3
thanks a million
This second file proves that the error is in line 6 and 8 of the first file
ie. the following highlighted in bold font
if(is_single() || is_page()) { $post_or_page_id = $post->ID; }
$data = get_post_meta($post_or_page_id, “custom_meta_values”, true);
if($data[“hide_thumbnail_on_single”])
$custom_settings[“layout”][“hide_thumbnail_on_single”] = $data[“hide_thumbnail_on_single”];
if($data[“columns”])
$custom_settings[“layout”][“columns”] = $data[“columns”];
but I don’t know I to solve this since I have not coded this and my web designer is no longer a web designer and unavailable
try replacing that section with this:
if (is_single() || is_page()) {
$post_or_page_id = $post->ID;
}
$data = get_post_meta($post_or_page_id, "custom_meta_values", true);
if ($data["hide_thumbnail_on_single"]) {
$custom_settings["layout"]["hide_thumbnail_on_single"] = $data["hide_thumbnail_on_single"];
}
if ($data["columns"]) {
$custom_settings["layout"]["columns"] = $data["columns"];
}
it looked like some curly brackets were missing
We corrected it, but now we get two errors
Warning: Illegal string offset ‘hide_thumbnail_on_single’ in /htdocs/public/www/wp-content/themes/ac2-theme/header.php on line 12 Warning: Illegal string offset ‘columns’ in /htdocs/public/www/wp-content/themes/ac2-theme/header.php on line 14
and
Warning: Illegal string offset ‘hide_thumbnail_on_single’ in /htdocs/public/www/wp-content/themes/ac2-theme/header.php on line 16 Warning: Illegal string offset ‘columns’ in /htdocs/public/www/wp-content/themes/ac2-theme/header.php on line 20
I pasted the index php file here <http://pastebin.com/9XcMDMEW>
Thanks in advance!
try using single quotes in ALL of your array elements and see if that helps.
for example, change this:
if ($data["columns"]) {
$custom_settings["layout"]["columns"] = $data["columns"];
}
to this:
if ($data['columns']) {
$custom_settings['layout']['columns'] = $data['columns'];
}
The only other thing I can think of is that there isn’t an array or there aren’t any values set for it.