Title: apply CSS styles to PHP text
Last modified: August 21, 2016

---

# apply CSS styles to PHP text

 *  Resolved [mpegler](https://wordpress.org/support/users/mpegler/)
 * (@mpegler)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/)
 * I have decided to run the Top-Bar as a footer replacement on our site
 * [http://www.bluehawaiiphototours.com/whiteshark/](http://www.bluehawaiiphototours.com/whiteshark/)
 * I have added footer text via php but I would like to change the color of the “
   Our Policy” link to white like the other link. How would I go about this?
 * Thanks in advance.
 * [https://wordpress.org/plugins/wp-topbar/](https://wordpress.org/plugins/wp-topbar/)

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

 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862519)
 * Hmm.. the URL above gives me a 404 error.
 *  Thread Starter [mpegler](https://wordpress.org/support/users/mpegler/)
 * (@mpegler)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862547)
 * Sorry about that. I had to relocate the site. It is live at [http://www.bluehawaiiphototours.com](https://wordpress.org/support/topic/apply-css-styles-to-php-text/www.bluehawaiiphototours.com?output_format=md)
 * Thanks.
 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862548)
 * It looks like you are adding the link via php:
 * `<span class="class1"> <a href="http://www.bluehawaiiphototours.com/policies/"
   >Our Policy</a> </span>`
 * You could change it to add a **style**. Like this to get the color you want:
 * `<span class="class1"> <a href="http://www.bluehawaiiphototours.com/policies/"
   style="color:#ffffff;">Our Policy</a> </span>`
 * Or you could change the color by adding **class1** via your themes’ CSS file.
   This will allow you add a `:hover` attribute to change the color when someone
   hovers over the link. Looks like you are using the Ronika theme. So find that
   folder and edit the `style.css` file.
 * Let me know if this solves it for you,
 * Bob
 *  Thread Starter [mpegler](https://wordpress.org/support/users/mpegler/)
 * (@mpegler)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862553)
 * Thanks for the reply! I knew it was a simple issue! We were close but I found
   that the style had to come before the href. Here is the code I used to solve 
   my problem.
 * In the AFTER PHP area I added the following:
 *     ```
       ?>
       <a style="color: #ffffff"; text-decoration: underline; href="http://www.bluehawaiiphototours.com/policies/" > Our Policy</a>  <?
       ```
   
 * Bam! Thank again for your help and the great plug-in.
 *  Plugin Author [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * (@rfgoetz)
 * [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862556)
 * Glad it is working for you!

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

The topic ‘apply CSS styles to PHP text’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-topbar_706d6d.svg)
 * [WP-TopBar](https://wordpress.org/plugins/wp-topbar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-topbar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-topbar/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-topbar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-topbar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-topbar/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [rfgoetz](https://wordpress.org/support/users/rfgoetz/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/apply-css-styles-to-php-text/#post-4862556)
 * Status: resolved