Support » Installing WordPress » [Plugin: Widget Logic] Using with TTFtitles

  • I’m interested in setting up TTFtitles to work with renaming my widget titles, but I’m confused about where I need to makes edits in my code to accommodate this:

    I added this filter in order to render all widget titles with the excellent [ttftext plugin]( like this:

    function ttftext_widget_title($content='', $widget_id='')
    {	preg_match("/<h2[^>]*>([^<]+)/",$content, $matches))
    	$insert_img=the_ttftext( $heading, false );
    	return $content;

    Where would I need to put this code? What changes do I need to make to it? And what additional code (and core page edits) would I need to make?

Viewing 1 replies (of 1 total)

    The ‘widget_content’ filter
    Once this is active (by the option tickbox at the foot of the widget admin page) you can modify the text displayed by any widget. In your theme’s functions.php file use:

    add_filter(‘widget_content’, ‘your_filter_function’, [priority], 2);

    add the your_filter_function right after that – ie in your theme’s functions.php file

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Widget Logic] Using with TTFtitles’ is closed to new replies.