Title: A help with PHP related to Tiny framework
Last modified: January 23, 2017

---

# A help with PHP related to Tiny framework

 *  Resolved [Goodwrk](https://wordpress.org/support/users/goodwrk/)
 * (@goodwrk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/)
 * Hi Tomas,
 * I created a php code to change color of two words of site title based on php 
   code I found on web.
 * Can you have a look at it and tell me if it will work?
 * Can I write to your email?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Thread Starter [Goodwrk](https://wordpress.org/support/users/goodwrk/)
 * (@goodwrk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/#post-8688178)
 *     ```
       //filter first bloginfo instance
   
       add_filter( 'body_class',
           function ( $class )
           {
               add_filter( 'bloginfo', 'modify_second_and_third_words', 2, 1)
               return $class;
           }
       );
   
       function modify_second_and_third_words( $output, $show)
       {
           static $counter = 0;
   
           // Target the "name" part:
   
           if( 'name' === $show )
           {
               // Target first instance:
               if( 1 === ++$counter )
               {
                   remove_filter( current_filter(), _FUNCTION_ );
   
                   // Modify second and third words of the blog title:
                   $title = explode( ' ', $output );
                   if( count( $title) > 0 )
                   {
                       $title[1,2] = sprintf( '<span>%s</span>', $title[1,2] );
                   }
                   $output = join( ' ', $title );
   
               }
   
   
   
           }
           return $output
       }
       ```
   
 * This is php code. After that I added css from that webpage, but after that my
   website didn’t show. Can you point out what part of this code is wrong?
    My site
   title consists of three words.
 *  Theme Author [Tomas Mackevicius](https://wordpress.org/support/users/tomasm/)
 * (@tomasm)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/#post-8688418)
 * I’m sorry, but it is not right way to do. You can use Cuztomizer and just pick
   a color with color picker or you use CSS to assign colors. So in every situation
   you use right tool.
 *  Thread Starter [Goodwrk](https://wordpress.org/support/users/goodwrk/)
 * (@goodwrk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/#post-8688521)
 * My site title consists of three words. For example, if I want the first word 
   to be white and other two to be green, I can’t do that with Customizer.
    Customizer
   only changes to one colour.
 *  Thread Starter [Goodwrk](https://wordpress.org/support/users/goodwrk/)
 * (@goodwrk)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/#post-8688867)
 * Thomas, I found some CSS to do this.
    I’ll try it tomorrow.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘A help with PHP related to Tiny framework’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/tiny-framework/2.3.1/screenshot.
   png)
 * Tiny Framework
 * [Support Threads](https://wordpress.org/support/theme/tiny-framework/)
 * [Active Topics](https://wordpress.org/support/theme/tiny-framework/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/tiny-framework/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/tiny-framework/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Goodwrk](https://wordpress.org/support/users/goodwrk/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/a-help-with-php-related-to-tiny-framework/#post-8688867)
 * Status: resolved