header php заменить php wp_head на script type text javascript src php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
header.php заменить:
<?php wp_head(); ?>
на:
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/jquery-1.2.6.min.js"></script>
<script type="text/javascript">
function toogle_alf(){
$("#alf").slideToggle();
}
</script>
<?php wp_head(); ?>
style.css добавит в конец:
#alf {
display:none;
}
#alf .menu {
padding-left:15px;
}
sidebar.php:
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="215" height="271" align="left" valign="top" background="<?php bloginfo('template_directory'); ?>/img/fon_left.jpg"><table width="215" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42"></td>
<td>
<?php include (TEMPLATEPATH . '/searchform_bar.php'); ?>
</td>
<td width="17">&nbsp;</td>
</tr>
<?php
$cats = get_categories();
$alfavit_parent = 5; // parent category
$flag = 0;
foreach ((array)$cats as $cat) {
if (($flag == 1) and ($cat->parent != $alfavit_parent)){
$flag = 0;
echo '</table></td></tr>';
}
echo '<tr>
<td width="42"></td>
<td width="156" class="menu">
<a href="' . get_category_link($cat->cat_ID) . '"';
if ($cat->cat_ID == $alfavit_parent) echo ' onclick="toogle_alf(); return false;"';
echo '>' . $cat->cat_name . '</a>
</td>
<td width="17">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><img src="';
bloginfo('template_directory');
echo '/img/menu_razd.jpg" width="215" height="3" border="0" /></td>
</tr>';
if ($cat->cat_ID == $alfavit_parent){
echo '<tr><td colspan="3"><table id="alf" width="215" border="0" cellspacing="0" cellpadding="0" >';
$flag = 1;
}
}
if ($flag == 1){
$flag = 0;
echo '</table></td></tr>';
}
?>
</table></td>