WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Post Title Color] Title colour affecting menu titles

[Resolved] [Plugin: Post Title Color] Title colour affecting menu titles

  • Very handy plugin – thanks!

    Just noticed a slight niggle though, in that the colouring can affect menu items. To get around this, I added an extra condition testing for in_the_loop() in the add_to_title function in the plugin as follows:

    function add_to_title( $title ) {
    		global $post;
    		if (get_post_meta($post->ID, 'title_color', true) && in_the_loop() )
    			return '<span style="color:' . get_post_meta($post->ID, 'title_color', true) . ';">' . $title . '</span>';
    		else
    			return $title;
    	}

    Hope that helps someone.

    http://wordpress.org/extend/plugins/post-title-colors/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] [Plugin: Post Title Color] Title colour affecting menu titles’ is closed to new replies.