The matter is that there is no need crawl in php. Enough to prescribe sub-css properties. Naprmer: vіvod own widget to include in <div id=”widget1″>.
Look what tags on a link displayed another and record them in the css.
Example:
<div id="widget1">
<ul>
<li><span id="bla-bla1"><a href="somewhere1">Smth1</a></span></li>
<li><span id="bla-bla2"><a href="somewhere2">Smth2</a></span></li>
</ul>
</div>
Tag ul already displayed widget.
In css write (if necessary adjust the appearance of links):
# widget1 ul li span a {
color: …
font-weight: …
}
It must work. If not – give me link.
Good luck! 🙂