Hello, all,
I believe i've messed my functions.php file, but can't find where.
The problem is that #main lies above #footer (you can check http://isparduotuvele.lt)
Could someone help me to find where exactly i made the error?
For additional info i paste mu functions.php here:
<?php
//add favicon
function childtheme_favicon() { ?>
<link rel="shortcut icon" href="http://kurapka.lt/ecwid-buttons/favicon.png" />
<script src="http://kurapka.lt/ecwid-buttons/ecwid-lt.js"></script>
<?php }
add_action('wp_head', 'childtheme_favicon');
// Adds a search box to your theme header
function header_search() { ?>
<!--Search Form-->
<div id="hsearch">
<script>
/* based on http://github.com/NV/placeholder.js/ */
function inputPlaceholder (input, placeholder, color) {
if (!input) return null;
var placeholder_color = color || '#AAA';
var default_color = input.style.color;
if (input.value === '' || input.value == placeholder) {
input.value = placeholder;
input.style.color = placeholder_color;
}
var add_event = /*@cc_on'attachEvent'||@*/'addEventListener';
input[add_event](/*@cc_on'on'+@*/'focus', function(){
input.style.color = default_color;
if (input.value == placeholder) {
input.value = '';
}
}, false);
input[add_event](/*@cc_on'on'+@*/'blur', function(){
if (input.value === '') {
input.value = placeholder;
input.style.color = placeholder_color;
} else {
input.style.color = default_color;
}
}, false);
input.form && input.form[add_event](/*@cc_on'on'+@*/'submit', function(){
if (input.value == placeholder) {
input.value = '';
}
}, false);
return input;
}
function getElementsByClassName(classname, node) {
if(!node) node = document.getElementsByTagName("body")[0];
var a = [];
var re = new RegExp('\\b' + classname + '\\b');
var els = node.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
if(re.test(els[i].className))a.push(els[i]);
return a;
}
function ecwid_set_placeholder() {
var search_box = getElementsByClassName('ecwid-SearchPanel-field')[0];
if (search_box) {
inputPlaceholder(search_box,'Ieškokite...');
clearInterval(ecwid_set_placeholder_interval);
}
}
var ecwid_set_placeholder_interval;
ecwid_set_placeholder_interval = setInterval('ecwid_set_placeholder();',100);
</script>
<script type="text/javascript" src="http://app.ecwid.com/script.js?91176" charset="utf-8"></script>
<script type="text/javascript"> xSearchPanel("style="); </script>
</div>
<div id="ecwidcarthead">
<script type="text/javascript" src="http://app.ecwid.com/script.js?91176" charset="utf-8"></script>
<!-- remove layout parameter if you want to position minicart yourself -->
<script type="text/javascript"> xMinicart("style="); </script>
</div>
<?php }
add_action('thematic_header','header_search',1);
//puslapių meniu
function childtheme_menu_args($args)
{
$args = array('show_home' => 'Katalogas', 'sort_column' => 'menu_order',
'menu_class' => 'menu', 'echo' => true, 'include' => '73, 75, 68');
return $args;
}
add_filter('wp_page_menu_args', 'childtheme_menu_args');
//category menu belowheader
function childtheme_catmenu()
{
if(is_page('25'))
{
?>
<div id="ecwdcatmenu">
<script type="text/javascript" src="http://app.ecwid.com/script.js?91176" charset="utf-8"></script>
<script type="text/javascript"> xCategories("style="); </script>
</div>
<?php }
else{}
}
add_action('thematic_belowheader', 'childtheme_catmenu');
?>
<?php
// This will create your widget area
function my_widgets_init() {
register_sidebar(array(
'name' => 'Header Aside',
'id' => 'header-aside',
'before_widget' => '<li id="%1$s" class="widgetcontainer %2$s">',
'after_widget' => "",
'before_title' => "<h3 class=\"widgettitle\">",
'after_title' => "</h3>\n",
));
}
add_action( 'init', 'my_widgets_init' );
// adding the widget area to your child theme
function my_header_widgets() {
if ( function_exists('dynamic_sidebar') && is_sidebar_active('header-aside') ) {
echo '<div id="header-aside" class="aside">'. "\n" . '<ul class="xoxo">' . "\n";
dynamic_sidebar('header-aside');
echo '' . "\n" . '</div><!-- #header-aside .aside -->'. "\n";
}
}
add_action('thematic_header', 'my_header_widgets', 2);
?>
Thank you in advance.