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

Getting an error 500 after I edit the code to replace "G"

Everything has been working as it should until I followed the steps to add the wp_head function and replace index.html etc with the PHP functions. Now it is throwing a 500 error. This is my code - am I making some stupid mistake, or is the problem in my functions file? I'm running MAMP which is working properly, and Chrome.

<!doctype html> <html class="no-js" lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title><?php wp_title(); ?> </title>

<? php wp_head(); ?>

</head>

<body> <header class="row no-max pad main"> <h1><a class='current' href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1> <a href="" class="nav-toggle"><span></span>Menu</a> <nav> <h1 class="open"><a class='current' href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></h1>

1 Answer

Please ignore this - I had a stray space in my opening PHP block for calling the wp_head. Fixed now. /facepalm