Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Adding HTML Markup with PHP1:37 with Zac Gordon
In this video, we show the two primary ways to add HTML markup inside of our surrounding PHP statements.
We can go about adding markup in two separate ways.
We can either add it inside of the echo statement like this.
However, in WordPress, markup is more commonly left outside of the PHP tags,
especially in templates.
This is brought down into one line, And the HTML is put outside of the PHP.
We see the same effect.
However, this way we're only writing PHP inside of our PHP blocks and
we're leaving our HTML outside of it.
We could see for example up here that p class site description and
then echoing the description is also following this convention here.
There are tons of different types of errors that you could get in WordPress and
in PHP specifically when you leave off certain things or type things incorrectly.
However, we're just going to leave it at this at this point so
that you know how to find the line number where something is going wrong and
then you could either dig deeper into PHP to find out more orr you could try
googling the error that you're having to see if you could find an answer that way.
Now that we've covered some basics about editing files, where to find them,
what not to edit, and how to find out about error messages, let's go ahead in
the next stage and start digging deeper into some PHP basics for WordPress.
You need to sign up for Treehouse in order to download course files.Sign up