Hi,
I have this widget that list all the pages from current family of pages. I want to change the title "menu" for the parent's name. Here is what I did:
function my_widget_title() {
global $post;
if( $post->post_parent ){
return get_the_title($post->post_parent);
}
}
add_filter('widget_title', 'my_widget_title');
But this change the title of all my widgets... Is there a way to specify which widget I want to change the title? Like I want to change the title of this Widget:
<div id="primary" class="aside main-aside"> ... </div>
Thank you for your help!