Possible Duplicate:
php edit for Cufon font replacement
I am reposting this due to the confusion and misconceptions of the previous post. I am trying to change the color of the menu items on my WORDPRESS website with no luck. I contacted the themes creator and he said to make the changes in the below code. I DONT SEE WHERE TO DO THIS THOUGH!!! There is a custom color changer in the wordpress theme setting but it does not have the ability to change menu or title (post or page) colors. (and i need to do both ) please help....note that changing the css also has availed nothing
<script type="text/javascript">
jQuery(document).ready(function($){
// Cufon font replacement & text shadows
Cufon.replace('#sidebar .font, #content .post .font, #card-container .font, #frontwidgets h3, #gallery .gal_item .font, #nicepagination .font',{ fontFamily: 'Junction', textShadow: '#fff 0px 1px' });
Cufon.replace('#footer .font',{ fontFamily: 'Junction', textShadow: '#000 0px -1px' });
Cufon.replace('#content .title-container .font, #mainmenu ul.menu li:not(.current_page_item, .current-menu-parent) a.font',{ fontFamily: 'Junction', textShadow: '#<?php echo $color->bg['-4']; ?> 0px -1px' });
Cufon.replace('#mainmenu ul.menu li.current-menu-item a.font, #mainmenu ul.menu li.current-menu-parent a.font',{ fontFamily: 'Junction', textShadow: 'none' });
// Fixing menu hovers as cufon can't seem to handle different div-hover colors
$('#mainmenu').find('ul.menu').children('li:not(.current-menu-item, .current-menu-parent)').hover(
function () {
Cufon.replace($(this).find('a.font'),{ fontFamily: 'Junction', color: '#<?php echo $color->bg['0']; ?>', textShadow: 'none' });
},
function () {
Cufon.replace($(this).find('a.font'),{ fontFamily: 'Junction', color: '#<?php echo $color->fg['-2']; ?>', textShadow: '#<?php echo $color->bg['-4']; ?> 0px -1px' });
}
);
});
</script>
Here is the css that i edited...it did nothing but what the heck
/* begin ---------------------------------------- menu */
#mainmenu {
position: absolute;
z-index: 10;
top: 81px;
width: 100%;
}
#mainmenu .wrapper {
position: relative;
width: 990px;
}
#menu-bg {
width: 990px;
height: 53px;
display: inline-block;
background: url('images/menu_bg.png') no-repeat;
}
#menu-left {
position: absolute;
top: 4px;
left: 0px;
height: 15px;
width: 15px;
background: url('images/menu_left.png') no-repeat;
}
#menu-right {
position: absolute;
top: 4px;
right: 0px;
height: 15px;
width: 15px;
background: url('images/menu_right.png') no-repeat;
}
#menu-container {
position: absolute;
top: 4px;
left: 15px;
width: 960px;
height: 43px;
display: inline-block;
background: url('images/patern_sharp.png');
float: left;
border-top: #000 1px solid;
border-bottom: 1px solid;
}
#mainmenu ul.menu {
position: absolute;
top: 0px;
left: 150px;
}
#mainmenu .dropdown_arrow {
height: 0px;
width: 0px;
position: absolute;
top: 19px;
right: 10px;
border-color: #fff transparent transparent transparent;
border-style: solid;
border-width: 5px;
}
#mainmenu ul.menu li.has-sub-menu:hover .dropdown_arrow, #mainmenu ul.menu li.has-sub-menu.current-menu-item .dropdown_arrow, #mainmenu ul.menu li.has-sub-menu.current-menu-parent .dropdown_arrow {
top: 21px;
}
#mainmenu ul.menu li {
float: left;
font-size: 14px;
padding: 15px;
margin: 0 3px;
display: inline-block;
position: relative;
}
#mainmenu ul.menu li.has-sub-menu {
padding-right: 30px;
}
#mainmenu ul.menu li a {
color: #fff;
}
#mainmenu ul.menu li:hover, #mainmenu ul.menu li.current-menu-item, #mainmenu ul.menu li.current-menu-parent {
background: #fff;
padding: 17px 14px 18px 14px;
margin: -3px 3px 0 3px;
border-top: #dedede 1px solid;
border-right: #dedede 1px solid;
border-left: #dedede 1px solid;
}
#mainmenu ul.menu li.has-sub-menu:hover, #mainmenu ul.menu li.has-sub-menu.current-menu-item, #mainmenu ul.menu li.has-sub-menu.current-menu-parent {
padding-right: 29px;
}
#mainmenu ul.menu li.has-sub-menu:hover {
padding-bottom: 24px;
}
#mainmenu ul.menu li ul.sub-menu {
position: absolute;
width: auto;
top: 55px;
left: -1px;
background: #fff;
display: none;
padding: 10px 0;
border-right: #dedede 1px solid;
border-bottom: #dedede 1px solid;
border-left: #dedede 1px solid;
}
#mainmenu ul.menu li:hover ul.sub-menu {
display: inline-block;
}
#mainmenu ul.menu li ul.sub-menu li {
clear: both;
height: auto;
width: 200px;
padding: 10px 15px;
margin: 0;
border: 0;
display: block;
}
#mainmenu ul.menu li ul.sub-menu li.current-menu-item, #mainmenu ul.menu li ul.sub-menu li:hover {
padding: 10px 15px;
margin: 0;
border: 0;
background: #eee;
}
#mainmenu ul.menu li:hover ul.sub-menu li a, #mainmenu ul.menu li ul.sub-menu li a {
padding: 0 10px 0 0;
display: block;
font-size: 13px;
height: auto;
}
#mainmenu ul.menu li a:hover, #mainmenu ul.menu li ul.sub-menu li a:hover {
text-decoration: none;
}
#stars-left {
background: url('images/stars.png') no-repeat开发者_高级运维;
position: absolute;
top: 20px;
left: 60px;
height: 13px;
width: 61px;
}
#stars-right {
background: url('images/stars.png') no-repeat;
position: absolute;
top: 20px;
right: 60px;
height: 13px;
width: 61px;
}
/* end ---------------------------------------- menu */
Cufon seems to have it's own CSS-like thing:
Cufon.replace('#sidebar .font, #content .post .font, #card-container .font, #frontwidgets h3, #gallery .gal_item .font, #nicepagination .font',{ fontFamily: 'Junction', textShadow: '#fff 0px 1px' });
Cufon.replace('#footer .font',{ fontFamily: 'Junction', textShadow: '#000 0px -1px' });
Cufon.replace('#content .title-container .font, #mainmenu ul.menu li:not(.current_page_item, .current-menu-parent) a.font',{ fontFamily: 'Junction', textShadow: '#<?php echo $color->bg['-4']; ?> 0px -1px' });
Cufon.replace('#mainmenu ul.menu li.current-menu-item a.font, #mainmenu ul.menu li.current-menu-parent a.font',{ fontFamily: 'Junction', textShadow: 'none' });
Try adding your CSS into those functions (I'd try color
).
精彩评论