Home › Forums › CSS › Help with CSS integration into wordpress › Re: Help with CSS integration into wordpress
In the header you can have JavaScript parse the URL and determine what page their on, I’ve done this before (not in WordPress) with jQuery:
var loc = loc.replace("/im/", "./").replace("/IM/", "./");
$("span#spc-loc").text(loc);
// To make it so the icons for each page shows correctly with the ? data this needs to be done. Forget switch()
// It won’t work here
$("#spc-loc:contains(‘index.php’)")
.parent()
.find(‘.home + .ico’)
.addClass(‘current’);
$("#spc-loc:contains(‘news.php’)")
.parent()
.find(‘.news + .ico’)
.addClass(‘current’);
$("#spc-loc:contains(‘about.php’)")
.parent()
.find(‘.about + .ico’)
.addClass(‘current’);
$("#spc-loc:contains(‘works.php’)")
.parent()
.find(‘.works + .ico’)
.addClass(‘current’);
$("#spc-loc:contains(‘/forum/’)")
.parent()
.find(‘.comm + .ico’)
.addClass(‘current’);
Where .spc-loc was:
Where $path was: