The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Post Title Color
[resolved] Title colour affecting menu titles (2 posts)

  1. sammuello
    Posted 4 years ago #

    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>';
    			return $title;

    Hope that helps someone.


  2. treysea
    Posted 4 years ago #

    thanks! that was very helpful.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Title Color
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic