Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Konrad Pilch
Konrad Pilch
2,435 Points

Whats up with this code in sublime

HI,

If we look at this code ;

 <p class="lead"><?php bloginfo('description'); ?></p>

Soblime text 2 , displays me the php whole white, its hard to read since its white same as my text . It works, its just displays white. Its saved as php , but still and this is WP so i don tknow . ANy ideas?

2 Answers

Kevin Korte
Kevin Korte
28,149 Points

It's probably one of two things. First thing to check is if Sublime correctly set the syntax hightlighter. You can go to View >> Syntax >> and make sure PHP is selected. Or in the bottom right of the window, it'll show what syntax highlighter it is using. Also try switching themes. Depending on the theme, it may not have the best color coding for PHP.

Konrad Pilch
Konrad Pilch
2,435 Points

Ah right, i think i got it, its the theme i believe. It displays tags like echo normal , but it doesnt recognies the WP code, while when i code in pure php, it does.

Neil Docherty
Neil Docherty
10,418 Points

You can change the colour preferences in Sublime. If you are using a Mac then, in the menu bar, go to Sublime Text > Preferences > Color Scheme.