Plugin Author
wizzud
(@wizzud)
Sorry, but at the moment there’s no easy way to do this.
CMW effectively consists of 2 parts : there’s the code that controls and builds the widget, and there’s the code that does the actual filtering and builds the menu. The title is really part of the widget code, but the widget allows that title to be overridden by a value passed back to it from the filter code. Unfortunately, the filter code currently only passes back the menu item’s title, nothing else about the menu item (such as its href).
It’s still possible to hook into the widget’s widget_title filter and wrap the title in an anchor, but your code would have to go fetch the menu for itself, scan through the items for a title match (hoping there’s only one!), construct the link using the item’s href, and pass it back to the CMW widget instance. As I said, not easy.
I’ll look into providing an option for CMW to do it … but I can make no promises.
PS. I’ve made an assumption that you are configuring CMW for Branch = Current Item, however if you are using it with a specific menu item as the Branch then you might be able to use something like the Widget Title Links plugin?
Plugin Author
wizzud
(@wizzud)
I have just released v3.1.4, which, besides a couple of bug fixes, has a new option in the Output section – below Set Title from – that might do what you asked me about.
Thread Starter
l r
(@lainyrache)
Thanks Wizzud!
Sorry for the slow reply- I’ve only just got round to working on this again… and yes your new upgrade does the job perfectly!
Thanks for all your help.