Get Widget Title
-
Hi all, I am trying to register my own sidebar to modify the format of the outputted html, like so:
<?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<div id="%1$s" class="widget entry %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 class="widgettitle">%1$', 'after_title' => '</h2>' )); ?>
That all works great. However, what I really wanted to do was to obtain the Title text associated with the current widget. That is for example “Archives” or whatever the user has changed that to.
I have tried to chug through some of the wp source code and my php knowledge and wp knowledge leaves me a little wanting.
So my question. Is it possible to obtain this information and reoutput it in the code above, for example:
<?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'before_widget' => '<div id="%1$s" class="widget entry %2$s">', 'after_widget' => '</div>', 'before_title' => '<h2 title="%title$" class="widgettitle">%1$', 'after_title' => '</h2>' )); ?>
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get Widget Title’ is closed to new replies.